start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/sh | |
# OPTIONAL FLAGS: | |
# | |
# -geoip true | |
# this will install maxmind geoip and auto update crontab file | |
# | |
# -cloudwatch true | |
# this will install aws cloud watch metrics and send them to aws dashboard | |
# |
function Promise() { | |
var callbacks = [], | |
promise = { | |
resolve: resolve, | |
reject: reject, | |
then: then, | |
safe: { | |
then: function safeThen(resolve, reject) { | |
promise.then(resolve, reject); | |
} |
box: wercker/golang | |
# Add services here | |
# Build definition | |
build: | |
# The steps that will be executed on build | |
steps: | |
# Sets the go workspace and places you package | |
# at the right place in the workspace tree | |
- setup-go-workspace |
// 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; |
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 |
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' \ |
//usr/bin/env go run $0 $@; exit |
We are obviously in the age of Microservices, Mobile first, Polyglot, post-Java JVM languages, GitHub and Docker uprise. In this world, Open Source usage dominates, and the speed of change is intense. Knowing the direction of DevOps tools and picking the right one for the project is crucial.
Continuous Integration is the practice of running your tests on a non-developer machine automatically everytime someone pushes new code into the source repository.
This has the tremendous advantage of always knowing if all tests work and getting fast feedback. The fast feedback is important so you always know right after you broke the build (introduced changes that made either the compile/build cycle or the tests fail) what you did that failed and how to revert it.
### 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 |