Change the base url of a gist to cdn.rawgit.com
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
Get-ChildItem $folderPath -recurse | %{ | |
if($_.Name -match "^*.`.iso$") | |
{ | |
$parent="$(Split-Path $_.FullName -Parent)"; | |
write-host "Extracting $($_.FullName) to $parent" | |
$arguments=@("x", "`"$($_.FullName)`"", "-o`"$($parent)`""); | |
$ex = start-process -FilePath "`"C:\Program Files\7-Zip\7z.exe`"" -ArgumentList $arguments -wait -PassThru; |
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
let state = { | |
nestedObj: { | |
x: 1, | |
y: 2, | |
}, | |
h: 10 | |
} | |
let addObj = { |
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
let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], | |
avgs = [], | |
sum = 0; | |
arr.forEach((el, i) => { | |
sum += el; | |
if ((i + 1) % 3 == 0) { | |
avgs.push(sum / 3); | |
sum = 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
let fibonacci = (n) => { | |
if(n <= 2) { | |
return 1; | |
} else { | |
return fibonacci(n - 1) + fibonacci(n - 2); | |
} | |
}; |
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
# .tmux.conf.local | |
==== | |
set -g default-terminal "screen-256color" | |
set-option -g status-position bottom | |
set-window-option -g xterm-keys on | |
bind-key -n S-Up set-option -g status | |
bind-key -n S-Down set-option -g status | |
bind-key -n S-Left previous-window | |
bind-key -n S-Right next-window | |
set-option -g status-fg white |
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
@namespace html url(http://www.w3.org/1999/xhtml); | |
@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
/* | |
Author: Twily | |
Description: Minimal flat styled tabs for Australis | |
Compitability: Firefox Nightly v31.0a1 - v32.0a1 (Australis) | |
CSS Variables were introduced to Firefox in v29.0a1 | |
Website: http://twily.info/ | |
*/ |
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/osascript | |
# | |
# now_playing.osascript | |
# | |
# Osascript to fetch the meta data of the currently playing | |
# track in Spotify. This works only on Mac OS X. | |
tell application "System Events" | |
set myList to (name of every process) | |
end tell |
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
console.log(9999999999999999); // 10000000000000000 | |
[] + {} // '[object Object]' | |
{} + [] // 0 | |
console.log(!+[]+[]+![] === 'truefalse'); // true | |
Math.max( ...[] ) // -Infinity | |
Math.max( undefined ) // NaN | |
console.log( …[] ) // undefined |
OlderNewer