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
gbump () { | |
what=${1:-patch} | |
echo "Bumping $what version and pushing to origin" | |
changed=$(git diff-index --name-only HEAD --) | |
[ -n "$changed" ] && git stash | |
git pull --rebase && npm version $what && git push && git push --tags | |
[ -n "$changed" ] && git stash pop | |
} |
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
###* | |
* Helper function which returns a reference to a value in an object hierarchy. | |
* Call with path to parent object if you wish to mutate a value in-place, as | |
* assignment on reference variables will only set the variable in the local scope. | |
* | |
* AngularJS: Available in 'app' module as 'pathToRef' constant. | |
* | |
* @param path {Array | String} Path components | |
* @param root {Object | Array} Root object to start at | |
* @param initIntermediary {Boolean} Initialize and continue on non-existant values (false = bail) |
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 = main | |
_DEPS = | |
_OBJ = $(NAME).o | |
SDIR = . | |
ODIR = . | |
CC = gcc | |
CFLAGS = -std=c99 -O2 -W -g -I. |
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
function! IndentationFoldExpr(ln) " {{{ | |
let line = getline(a:ln) | |
if line =~ '^\s*$' | |
return '-1' "'=' | |
end | |
let ind = indent(a:ln) / &sw | |
let ind_next = indent(nextnonblank(a:ln+1)) / &sw |
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 data = { | |
id: trackID(track), | |
uri: track, // spotify:track:... | |
artists: [ | |
{ name: 'Unknown', uri: 'spotify:artist:518rTAIFPwQjLUSi4Pdzzn' } | |
], | |
title: track, // track name (title) | |
requests: 1, // number of requests | |
requesters: [ // length == requests | |
{ user: 'Anonymous', url: 'http://', time: new Date() } |
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
<?php | |
function relativePath($from, $to) { | |
$fromAry = explode('/', $from); | |
$toAry = explode('/', $to); | |
while (count($fromAry) && count($toAry) && $fromAry[0] === $toAry[0]) { | |
array_shift($fromAry); | |
array_shift($toAry); | |
} | |
$up = count($fromAry); |
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
import cookie from 'tiny-cookie' | |
console.log(cookie) |
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
<?php | |
// src/plugins/redirects.php | |
function htmlRedirect($to) { | |
$to = esc($to); | |
echo <<<EOF | |
<html> | |
<head> | |
<meta http-equiv="Refresh" content="0; url=$to" /> | |
</head> |
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
# Make Ctrl-] copy current input to system clipboard | |
pbcopy-whole-line() { | |
echo -n $BUFFER | pbcopy | |
}; zle -N pbcopy-whole-line | |
bindkey '^]' pbcopy-whole-line |
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
diff --git a/autoload/csscomplete.vim b/autoload/csscomplete.vim | |
index 162171f..799aead 100644 | |
--- a/autoload/csscomplete.vim | |
+++ b/autoload/csscomplete.vim | |
@@ -98,14 +98,10 @@ function! csscomplete#CompleteCSS(findstart, base) | |
let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$') | |
for m in s:values | |
- let postfix = '' | |
- if strridx(after, ':') < 0 |
OlderNewer