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
; -*- mode: clojure; -*- | |
; vim: filetype=clojure | |
(logging/init) | |
(repl-server {:host "127.0.0.1" :port 55554}) | |
(let [host "0.0.0.0"] | |
(tcp-server {:host host :port 55555}) | |
(udp-server {:host host :port 55555}) |
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
[appservers:children] | |
datacenter-1 | |
datacenter-2 | |
[datacenter-1] | |
appservers00[1:3].datacenter-1.example.com | |
[datacenter-2] | |
appservers00[1:3].datacenter-2.example.com |
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
execve("/usr/bin/docker", ["docker", "pull", "java:latest"], [/* 38 vars */]) = 0 | |
brk(0) = 0x1baa000 | |
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f18e08a7000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/etc/ld.so.cache", O_RDONLY) = 3 | |
fstat(3, {st_mode=S_IFREG|0644, st_size=46557, ...}) = 0 | |
mmap(NULL, 46557, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f18e089b000 | |
close(3) = 0 | |
open("/lib64/libpthread.so.0", O_RDONLY) = 3 | |
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340]\200\3112\0\0\0@\0\0\0\0\0\0\0\250/\2\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0)\0(\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\200\3112\0\0\0@\0\200\3112\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0000\30\1\0\0\0\0\0000\30\201\3112\0\0\0000\30\201\3112\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\200\3112\0\0\0\0\0\200\3112\0\0\0\360m\1\0\0\ |
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
irb> RUBY_VERSION | |
=> "1.9.3" | |
# it's 1.9.3-p374 if you wanna get picky.. | |
> JSON::VERSION | |
=> "1.5.4" | |
# So I have some json, from the body of a RestClient response that looks something like this: | |
irb> json = "{\"name\":\"Centrale Laiti\\u00e8re\"}" | |
=> "{\"name\":\"Centrale Laiti\\u00e8re\"}" |
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
# unbind C-b if you prefer using screen's ^a command sequence | |
# set -g prefix C-a | |
# alt-arrow bindings to switch windows | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# get visual notifications of activity from other windows |
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
; Wanting to pass events by host/service, if state changed and consistent for `len-run` events | |
; modified changed-state macro to use runs | |
(defmacro stable-changed-state | |
"Passes on changes in state for each distinct host and service." | |
[len-run & children] | |
`(by [:host :service] | |
(runs ~len-run | |
(changed :state ~@children)))) | |
(def send-alert #(debug "WOULD ALERT ON" %)) |
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
#!/bin/bash | |
# | |
# Hack to extract stats for a file including the actual creation time | |
# | |
# Uses debugfs which includes the crtime value in it's output: | |
# | |
# Inode: 23072101 Type: regular Mode: 0664 Flags: 0x80000 | |
# Generation: 1861227769 Version: 0x00000000:00000001 | |
# User: 1000 Group: 1000 Size: 0 | |
# File ACL: 0 Directory ACL: 0 |
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 ruby | |
# | |
# Forking example using pipes to communicate from child processes | |
def log(msg) | |
case msg | |
when Array then msg.each {|m| log(" #{m}") } | |
else | |
puts "[#{Time.now}][#{$$}] #{msg}" | |
end |
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
# re: capistrano-2.6.0/lib/capistrano/recipes/deploy/strategy/remote.rb | |
require 'capistrano/recipes/deploy/strategy/base' | |
module Capistrano | |
module Deploy | |
module Strategy | |
# An abstract superclass, which forms the base for all deployment | |
# strategies which work by grabbing the code from the repository directly | |
# from remote host. This includes deploying by checkout (the default), |
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 InsertTabWrapper() | |
let col = col('.') - 1 | |
if !col || getline('.')[col - 1] !~ '\k' | |
return "\<tab>" | |
else | |
return "\<c-p>" | |
endif | |
endfunction | |
inoremap <tab> <c-r>=InsertTabWrapper()<cr> |
NewerOlder