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
const double pi = acos(double(-1)); |
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
User-agent: * | |
Disallow: / |
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
# Auto detect text files and perform LF normalization | |
* text=auto | |
# Custom for Visual Studio | |
*.cs diff=csharp | |
# Standard to msysgit | |
*.doc diff=astextplain | |
*.DOC diff=astextplain | |
*.docx diff=astextplain |
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
window.addEventListener('error', function (e) { | |
const stack = e.error.stack; | |
let message = e.error.toString(); | |
if (stack) { | |
message += '\n' + stack; | |
} | |
const xhr = new XMLHttpRequest(); | |
xhr.open('POST', '/log', true); | |
xhr.send(message); | |
}); |
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
document.addEventListener('visibilitychange', function () { | |
document.hidden ? document.title = '(●—●)喔哟,崩溃啦!' | |
: document.title = '(/≧▽≦/)咦!又好了!' | |
}) |
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
javascript:document.body.contentEditable='true';document.designMode='on'; void(0); |
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
/** | |
* Highlights text within a dom element. | |
* | |
* Specifically this is designed to work with the output | |
* positions of terms returned from a lunr search. | |
* | |
* @param {HTMLElement} element - the element that contains text to highlight. | |
* @param {MatchLocation[]} matches - the list of matches to highlight. | |
*/ | |
module.exports = function (element, matches) { |
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
#!/bin/sh | |
git filter-branch --commit-filter ' | |
OLD_EMAIL="your-old-email@example.com" | |
CORRECT_NAME="your-correct-name" | |
CORRECT_EMAIL="your-correct-email@example.com" | |
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]; | |
then | |
GIT_AUTHOR_NAME="$CORRECT_NAME"; |
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
#!/bin/bash | |
red='\e[91m' | |
green='\e[92m' | |
yellow='\e[93m' | |
magenta='\e[95m' | |
cyan='\e[96m' | |
none='\e[0m' | |
# Root |
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
/* | |
enhance CapsLock | |
CapsLock -> Backspace | |
C - CapsLock -> Delete | |
A - CapsLock -> Enter | |
*/ | |
SetCapsLockState, AlwaysOff | |
CapsLock::SendInput {Backspace} | |
+CapsLock::SendInput {Delete} | |
^CapsLock::SendInput {Enter} |
OlderNewer