Just toying around with RxJS stuff.
A Pen by Michael Russell on CodePen.
{ | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin, text.haml", | |
"auto_complete_triggers": | |
[ | |
{ | |
"characters": "<", | |
"selector": "text.html" | |
}, | |
{ |
## Use the file below (.gitkeep) to ensure git keeps up with the directory | |
## - Useful if you need to ignore entire contents but keep the folder intact. | |
!.gitkeep | |
### OSX | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
Icon | |
# Thumbnails |
<!DOCTYPE html> | |
<html lang="en"> | |
<body class="container"> | |
<h1>Some Title</h1> | |
<% if (names.length) { %> | |
<ul> | |
<% names.forEach(function(name){ %> | |
<li><%= name %></li> |
jQuery.event.special.outsideclick = { | |
setup: function(data, namespaces, handler){ | |
var $this = $(this); | |
var namespace = namespaces.join('.'); | |
function _clickHandler(e){ | |
var handleClick = true; | |
var mouseUsed = 'button' in e; | |
if(namespace === 'mouse' && !mouseUsed){ | |
handleClick = false; |
site(){ | |
cd ~/Sites/$1 | |
} | |
_site() | |
{ | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=( $(compgen -W "$(ls ~/Sites/)" -- $cur) ) | |
} | |
complete -F _site site |
# Sublime text project completions | |
function sublp(){ | |
subl --project ~/Sites/**/${1}.sublime-project | |
} | |
_sublp() | |
{ | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
local list=`ls -1 ~/Sites/**/*sublime-project | cut -d/ -f5` | |
COMPREPLY=( $(compgen -W "${list}" -- ${cur}) ) |
Just toying around with RxJS stuff.
A Pen by Michael Russell on CodePen.
A Pen by Michael Russell on CodePen.
<pre style="padding: 20px"><code class="hljs js"> | |
function pipeline(data, ...fns){ | |
return fns.reduce((acc, curr) => curr(acc), data); | |
} | |
let abc = pipeline('a', (v)=>v+'b', (v)=>v+'c'); | |
console.log(abc); | |
// "abc" |
A Pen by Michael Russell on CodePen.