- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
Discover gists
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
/* | |
* var person = { firstName: 'bill', lastName: 'johnson' } | |
* | |
* person = _.rename(person, 'firstName', 'first') | |
* person = _.rename(person, 'lastName', 'last') | |
* | |
* console.log(person) // { first: 'bill', last: 'johnson' } | |
*/ | |
_.rename = (obj, key, newKey) => { |
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('keyup', function(e) { | |
9 != e.keyCode || e.metaKey || e.ctrlKey || console.log(document.activeElement) | |
}, false) |
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('keyup', function(e) { | |
9 != e.keyCode || e.metaKey || e.ctrlKey || console.log(document.activeElement) | |
}, false) |
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
/** | |
* @name debounce | |
* @summary Debounces "func" within "wait". | |
* @see {@link https://davidwalsh.name/javascript-debounce-function} | |
* @see {@link https://www.freecodecamp.org/news/javascript-debounce-example/} | |
* @example <button onClick={debounce(() => console.log("1s"), 1000)}>Debounce</button> | |
* @param {Function} func | |
* @param {number} [wait] | |
* @returns {Function} | |
*/ |
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
// Encode | |
echo -n 'username:password' | openssl base64 | |
// dXNlcm5hbWU6cGFzc3dvcmQ= | |
// Decode | |
echo `echo dXNlcm5hbWU6cGFzc3dvcmQ= | base64 --decode` | |
// username:password |
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
#! /usr/bin/env nu | |
let $status = tailscale lock status --json | from json | |
let $nodes = $status | get FilteredPeers | |
let $nodes_mullvad = $nodes | where Name =~ ".mullvad.ts.net" | |
let count_total = $nodes | length | |
let count_mullvad = $nodes_mullvad | 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
/* | |
* var person = { firstName: 'bill', lastName: 'johnson' } | |
* | |
* person = _.rename(person, 'firstName', 'first') | |
* person = _.rename(person, 'lastName', 'last') | |
* | |
* console.log(person) // { first: 'bill', last: 'johnson' } | |
*/ | |
_.rename = function(obj, key, newKey) { |
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
/*! | |
* ExternalTemplateRemotesPlugin | |
* License: MIT (https://mit-license.org/) | |
*/ | |
const extractUrlAndGlobal = require('webpack/lib/util/extractUrlAndGlobal'); | |
const { RawSource } = require('webpack-sources'); | |
const PLUGIN_NAME = 'ExternalTemplateRemotesPlugin'; |
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
/*! | |
* ExternalTemplateRemotesPlugin | |
* License: MIT (https://mit-license.org/) | |
*/ | |
const extractUrlAndGlobal = require('webpack/lib/util/extractUrlAndGlobal'); | |
const { RawSource } = require('webpack-sources'); | |
const PLUGIN_NAME = 'ExternalTemplateRemotesPlugin'; |
NewerOlder