This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add a "on edit" trigger. | |
function onEdit(e) { | |
e.range | |
.setFontSize(10) | |
.setFontFamily("Arial"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python_regex = "((\\w{2,}\\.){2,}(\\w{2,}))"; | |
path_regex = "(\\w+\\/){2,}(\\w+\\.\\w+)(:\\d+)?"; | |
code_style = {} | |
code_style[DocumentApp.Attribute.FONT_FAMILY] = 'Courier New'; | |
function styleMatches(regex) { | |
doc = DocumentApp.getActiveDocument(); | |
var body = doc.getBody(); | |
match = null; | |
while (true) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" Finds a Jira ticket ID from the branch name and prefixes the commit message with it. | |
It won't add it if it was already found in the message. | |
Warns if it can't find the ticket ID. | |
TO INSTALL | |
Copy this file into your .git/hooks folder for each local repository. | |
Make sure to make it executable with: chmod +x .git/hooks/prepare-commit-msg. | |
Test with an empty commit: git commit --allow-empty -m "test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv | |
import subprocess | |
import sys | |
git_rev_list = subprocess.check_output( | |
"git log --no-merges --pretty='%H|%an|%aI|%s' origin/master".split(" ")).decode( | |
sys.stdout.encoding).rstrip().splitlines() | |
with open('commit_stats.csv', 'w', ) as file_handler: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let get_sponsored_context = () => document.querySelector("div[aria-label=Sponsored]").parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.querySelector("div[aria-label='Actions for this post']"); | |
let get_hide_this_ad = () => document.querySelector("[role=menuitem]"); | |
let get_close_dialog = () => document.querySelector("div[role=dialog] [aria-label=Close]"); | |
function click_close_dialog() { | |
let close_dialog = undefined; | |
try { close_dialog = get_close_dialog(); } catch{ } | |
if (close_dialog) { | |
console.log("Close dialog found.") | |
close_dialog.click(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TRUNCATE TABLE [dbo].[UFRecordDataBit] | |
TRUNCATE TABLE [dbo].[UFRecordDataDateTime] | |
TRUNCATE TABLE [dbo].[UFRecordDataInteger] | |
TRUNCATE TABLE [dbo].[UFRecordDataLongString] | |
TRUNCATE TABLE [dbo].[UFRecordDataString] | |
-- Delete allows to remove rows with constraints, in this case we removed all rows | |
-- that may reference these just above, but the server wouldn't know! | |
DELETE FROM [dbo].[UFRecordFields] | |
TRUNCATE TABLE [dbo].[UFRecords] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Click actions dropdown. | |
$("#contentcolumn > div > div > form > div > div.umb-editor-header.umb-panel-header.ng-scope > div > div > div > div.umb-editor-header__actions-menu > div > a").click(); | |
setTimeout(() => | |
{ | |
// Click the delete item. | |
$("#contentcolumn > div > div > form > div > div.umb-editor-header.umb-panel-header.ng-scope > div > div > div > div.umb-editor-header__actions-menu > div > ul > li:nth-child(1) > a").click(); | |
setTimeout(() => | |
{ // Click checkbox to confirm. | |
$("#old-dialog-service > div > div > ng-switch > div > label > input").click(); | |
setTimeout(() => $("#old-dialog-service > div > div > ng-switch > div > div > div > div > a.btn.btn-primary.ng-scope > localize").click(), 200); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
function scrollToFormIfInteractedWith() { | |
// Find a target to scroll to if the user is interacting with forms. This happens in different ways: | |
// - Find a submit message that is not wrapped in a form (the message is always present even when not visible | |
// as the form has just been loaded. | |
// - If the message wasn't found then try to target a form containing a hidden field that indicates that the form's | |
// step/page is not the first(0) one. | |
// - If that wasn't found either then try to find a form that has PreviousClicked = true where the user just | |
// navigated back. This is CURRENTLY NOT WORKING possibly because of an Umbraco Forms issue for which I've raise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.pipe(scopeCss('.umbraco-backend-scope')) | |
.pipe(insert.prepend(fs.readFileSync(path.resolve(__dirname, 'src/sass/_cms.scss'), { encoding: 'utf8' }))) | |
.pipe(rename({ | |
suffix: '-scoped' | |
})) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Owin; | |
using Owin; | |
using Umbraco.Core; | |
using Umbraco.Core.Security; | |
using Umbraco.Web.Security.Identity; | |
using Umbraco.Core.Models.Identity; | |
using Website.Web; | |
using Umbraco.Web; | |
//To use this startup class, change the appSetting value in the web.config called |
NewerOlder