const divide = R.curry(function (a, b) {
return b === 0 ? Either.Left('Dicision by 0.') : Either.Right(a / b);
});
const addTwo = R.curry(function (val) {
return val + 2;
});
This file contains hidden or 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
################################################################################ | |
# Default Aliases | |
################################################################################ | |
# Setup in `.zshrc` | |
# `source $HOME/.aliases` | |
# Easier navigation: .., ..., ...., ....., ~ and - | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." |
This file contains hidden or 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
//oo | |
function Foo(who) { | |
this.me = who; | |
} | |
Foo.prototype.identify = function () { | |
return this.me; | |
} | |
function Bar (who) { |
This file contains hidden or 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 | |
## Linux setup. Still working on fine tuning, but its operational or I think it is. | |
### Echo Notification | |
fancy_echo() { | |
printf "\n%b\n" "$1" | |
} | |
### Check disto | |
if ! grep -qiE 'wheezy|jessie|precise|trusty' /etc/os-release; then |
This file contains hidden or 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
Show hidden characters
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"All Autocomplete", | |
"ApplySyntax", | |
"Babel", |
This file contains hidden or 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
dbus-send --print-reply --dest=net.kevinmehall.Pithos /net/kevinmehall/Pithos net.kevinmehall.Pithos.PlayPause | |
dbus-send --print-reply --dest=net.kevinmehall.Pithos /net/kevinmehall/Pithos net.kevinmehall.Pithos.SkipSong | |
dbus-send --print-reply --dest=net.kevinmehall.Pithos /net/kevinmehall/Pithos net.kevinmehall.Pithos.GetCurrentSong |
This file contains hidden or 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 Dict(elements) { | |
this.elements = elements || {}; | |
} | |
Dict.prototype.has = function (key) { | |
return {}.hasOwnProperty.call(this.elements, key); | |
}; | |
Dict.prototype.get = function (key) { | |
return this.has(key) ? this.elements[key] : undefined; | |
}; | |
Dict.prototype.set = function (key, val) { |
This file contains hidden or 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
*, | |
a, | |
input, | |
button, | |
img, | |
select, | |
a:focus, | |
input:focus, | |
button:focus, | |
img:focus, |