This file contains 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
// Remove all drafts from your drafts view | |
// Navigate to drafts | |
// F12 to raise dev console | |
// Paste the below | |
(async function(x) { | |
for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) { | |
e.click(); | |
await new Promise(resolve => setTimeout(resolve, 500)) | |
document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click(); | |
await new Promise(resolve => setTimeout(resolve, 1500)) |
This file contains 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
# Some handy aliases I use for git/terminal. | |
# For bash/zsh. | |
# "git pull all (nested)" | |
# maxdepth 4 is arbitrary for my needs, e.g, stuff like: | |
# dev root folder -> client space -> project workspace -> repo1, repo2, repo3 | |
alias gpa='find . -type d -maxdepth 4 -name .git -exec git --git-dir={} --work-dir=$PWD/{}/../ pull \;' |
This file contains 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
<script> | |
import { onDestroy } from 'svelte'; | |
import { healthcheck } from '../stores/healthcheck.js'; | |
</script> | |
<h1>My Healthcheck Page</h1> | |
<p>Server healthcheck: <code>{JSON.stringify($healthcheck)}</code></p> |
This file contains 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
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
This file contains 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
/** | |
* Load remote template code via XHR | |
* Then create Blaze Template from it. | |
* Will result in Template[templateName] being defined. | |
*/ | |
function loadBlazeTemplates(options) { | |
var d = $.Deferred(); | |
var loadTotal = Object.keys(options).length; |
This file contains 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
/** | |
* Basic skeleton for a Jasmine spec file, to test a jQuery plugin. | |
*/ | |
describe("myPlugin specs", function () { | |
var $container; | |
/** | |
* Mock mininum amount of html required for plugin to operate. | |
*/ |
This file contains 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
$("body").off("click"); | |
$("body").on("click", function(event) { | |
console.log("body click pageX: " + event.pageX + " pageY: " + event.pageY); | |
if (typeof event.pageX === "undefined" || typeof event.pageY === "undefined") { | |
console.log("Not a user-originated click event, aborting."); | |
return; | |
} |