Skip to content

Instantly share code, notes, and snippets.

View fetchTe's full-sized avatar

te fetchTe

View GitHub Profile

Either Example

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;
});
################################################################################
# Default Aliases
################################################################################
# Setup in `.zshrc`
# `source $HOME/.aliases`
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
//oo
function Foo(who) {
this.me = who;
}
Foo.prototype.identify = function () {
return this.me;
}
function Bar (who) {
#!/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
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"All Autocomplete",
"ApplySyntax",
"Babel",
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
@fetchTe
fetchTe / work-set.js
Created June 14, 2015 20:52
Traversing the social network
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) {
*,
a,
input,
button,
img,
select,
a:focus,
input:focus,
button:focus,
img:focus,
@fetchTe
fetchTe / Stylus-Material-Button-Mixin.markdown
Last active August 29, 2015 14:20
Stylus Material Button Mixin

Stylus Material Button Mixin

A nice little Stylus mixin to create "material-like" buttons with ease and no js.

A Pen by Tyler Schultz on CodePen.

License MIT