Skip to content

Instantly share code, notes, and snippets.

View philipz's full-sized avatar

philipz philipz

View GitHub Profile
#!/usr/bin/env bash
TOKEN=$1
journalctl -o short -f | awk -v token=$TOKEN '{ print token, $0; fflush(); }' | ncat data.logentries.com 10000
@philipz
philipz / gist:8b3f9e010ddf4ffeddd8
Created June 17, 2014 09:23
Systemd list dependency service
systemctl list-dependencies --after remote-fs.target
@philipz
philipz / gist:1217399bcd0de8334928
Last active August 29, 2015 14:03
NERDTree Note

add .vimrc

nmap <F5> :NERDTree<CR>

t new tab

gT gt Switching tabs

i open split

@philipz
philipz / gist:478a3da08129973216b1
Last active August 29, 2015 14:03
About Mosquitto Bridge conf

Reference

connection tradingbot 
address 192.168.2.18:1883 
topic # both 2 
clientid mosquitto 
notifications true 
start_type automatic 
try_private flase 

username XXXX

@philipz
philipz / gist:0ca040aea1dd9c960755
Last active August 29, 2015 14:03
gist-reveal.html
.include /usr/lib/systemd/system/docker.service
[Service]
ExecStart=
ExecStart=/usr/bin/docker -d -s=btrfs -r=false -H fd:// --dns=172.17.42.1 --dns-search=cluster.local
docker run -v /home/core/confd/confd:/etc/confd,/home/core/confd/tmp:/tmp philipz/confd:0.5.0 confd -verbose -onetime -node 'http://${COREOS_PRIVATE_IPV4}:4001'
From http://play.golang.org/p/-pR3Bn6efy
{{range $index,$server := .myapp_upstream}}{{ if $index }}, {{ end }}{{$server.Value}}{{end}}

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
https://github.com/coreos/fleet/blob/master/Documentation/api-v1-alpha.md
http://192.168.2.19:4001/v2/keys/_coreos.com/fleet?recursive=true
http://192.168.2.19:4001/v2/keys/_coreos.com/fleet/machines?recursive=true