mkdir passport-local
npm init
# Use default values for npm init prompts
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
function getQueryParam(name) { | |
window.location.search | |
const paramStr = window.location.search.substr(1).split('&').find(param => param.includes(`${name}=`)); | |
const nameValue = paramStr.split('='); | |
if (nameValue.length === 2) { | |
return nameValue[1]; | |
} | |
return null; |
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
history | grep -e "\d\+\s\+git checkout [^-.]\+" | awk '{ print $NF }' | tail -n 10 |
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
/** | |
* This is based on https://getbootstrap.com/docs/4.1/utilities/spacing/ | |
*/ | |
$directioMap: ( | |
top: t, | |
right: r, | |
left: l, | |
bottom: b | |
); |
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
{ | |
... | |
"scripts": { | |
"post-install-cmd": "(cd .git/hooks/; ln -s -f ../../mysite/tools/git-pre-commit-hook ./pre-commit)" | |
}, |
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
(function() { | |
var __timerIDs = {}; | |
/** | |
* Make sure the callback won't run more than once | |
* during a specified duration. | |
* | |
* This function relies on variable __timerIDs | |
* in outer scope. | |
* |
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
/** | |
* Usage: | |
* | |
* Set custom (percentage or absolute) width on .video-outer-wrapper | |
* | |
* ``html | |
* <div class="video-outer-wrapper"> | |
* <div class="video-wrapper"> | |
* <iframe ... ></iframe> | |
* </div> |
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
""" | |
" USAGE: | |
" | |
" 1. Place the cursor in the rule that you want to look up | |
" 2. :SCSSShowRulePath | |
""" | |
command! ScssShowRulePath :call ScssRulePath() | |
function! ScssRulePath() | |
let start_line_num = 0 |
NewerOlder