REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
| copy($(".checklist-item:not(.checklist-item-checked)").map(function() { | |
| var e = $(this), | |
| item = e.find(".checklist-item-details-text").text() | |
| if (e.hasClass("checklist-item-state-complete")) { | |
| item = item + " (DONE)" | |
| } | |
| return item | |
| }).get().join("\n")) |
| const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
| async function something() { | |
| console.log("this might take some time...."); | |
| await delay(5000); | |
| console.log("done!") | |
| } | |
| something(); |
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
More detailed version: https://til.simonwillison.net/git/git-archive
| // Shannon entropy | |
| const entropy = str => { | |
| return [...new Set(str)] | |
| .map(chr => { | |
| return str.match(new RegExp(chr, 'g')).length; | |
| }) | |
| .reduce((sum, frequency) => { | |
| let p = frequency / str.length; | |
| return sum + p * Math.log2(1 / p); | |
| }, 0); |
| EXEC sp_configure 'Ole Automation Procedures', 1; | |
| GO | |
| RECONFIGURE; | |
| GO |
| #!/usr/bin/env bash | |
| git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
| git fetch --all | |
| git pull --all |