⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
// takes arguments and produces an array of functions that accept context | |
function handle_args() { | |
var args = Array.prototype.slice.call(arguments); | |
return args.map(function(arg) { | |
if(arg instanceof Function) return arg; // Presumably already a contex-accepting function. | |
if(arg instanceof Array) return and.apply(this, arg); // make arrays behave as and. | |
// Presuming a string, build a function to check. | |
var my_regex = new RegExp(arg.toString(), 'i'); | |
return function(context) { | |
return context.search(my_regex) > -1; |
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
((root, Library)-> | |
if typeof! define is \Function && typeof! define[\amd] is "Object" && define[\amd]? | |
define <[ exports ]>, Library | |
else | |
Library = Library(typeof exports is "object" and exports or (root["Library"] = do | |
noConflict: ((original) -> | |
noConflict = -> | |
root["Libraby"] = original | |
delete! Library.noConflict | |
Library |
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
deploy: | |
steps: | |
- add-to-known_hosts: | |
hostname: $HOSTNAME | |
- add-ssh-key: | |
keyname: KEY | |
- script: | |
name: Push to dokku | |
code: | | |
git remote add dokku dokku@$HOSTNAME:$APP |
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
XGETTEXT_FLAGS = --no-wrap --language=c --from-code=UTF-8 --output=- - | |
$(POT_FILE): $(TEMPLATES) $(filter-out $(BINDATA), $(GO_FILES)) | |
@cat $? \ | |
| grep -i gettext \ | |
| sed -e "s/ngettext \"\([^\"]*\)\".\"\([^\"]*\)\".\(.*\) }}/ngettext(\"\1\", \"\2\", \3) }}/g" \ | |
| sed -e "s/[^n]gettext \"\(.*\)\"/ gettext(\"\1\")/g" \ | |
| sed -e "s/NGetText(\([^\)]*\))/ ngettext(\1) /g" \ | |
| sed -e "s/GetText(\([^\)]*\))/ gettext(\1) /g" \ | |
| xgettext $(XGETTEXT_FLAGS) \ | |
| sed -e '1,20d' \ |
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/env go run $0 $@; exit |
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
### My publicly-auditable identity: | |
https://keybase.io/olebedev | |
### From the command line: | |
Consider the [keybase command line program](https://keybase.io/download). | |
```bash | |
# look me up |
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
MAIN_GOPATH=/usr/local/Cellar/go/1.2/workspace | |
export GOPATH=$MAIN_GOPATH | |
MAIN_PATH=$PATH:$GOPATH/bin | |
export PATH=$MAIN_PATH | |
# goenv functions | |
activate(){ | |
export GOPATH="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)" | |
export OLDPS1=$PS1 | |
export PS1="(go:$(basename $GOPATH)) $PS1" |
For Go projects that consist of only one package, the following Travis configuration is enough to get started with coveralls.io. You may want to encrypt your $COVERALLS_TOKEN
via Travis encryption keys though.
language: go
go:
- 1.3.1
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
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |