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
require 'cgi' | |
require 'terminal-notifier' | |
f = ARGV.first | |
fn = f.split('/').last | |
system("scp '#{f}' 'azure:/home/kenneth/www/akhun.com/public/seo/skitch/#{fn.gsub(' ', '\ ')}'") | |
system("mv '#{f}' '#{File.expand_path('~/.Trash/')}/'") | |
system("echo 'http://akhun.com/seo/skitch/#{CGI.escape(fn).gsub('+', '%20')}' | pbcopy") |
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 | |
require 'scout_api' | |
group_name = ARGV[0] | |
Scout::Account.new('chartboost', 'kenneth@chartboost.com', '...') | |
all_servers = Scout::Server.all(group_name: 'API') |
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
(ns cb.broker | |
(:require clojure.pprint | |
clojure.stacktrace) | |
(:use [org.zeromq.clojure :as zmq] | |
[clojure.tools.cli :as cli] | |
[clj-yaml.core :as yaml]) | |
(:import com.surftools.BeanstalkClient.Client | |
com.surftools.BeanstalkClientImpl.ClientImpl) | |
(:gen-class)) |
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
[Unit] | |
Description=web-app | |
After=init.kballenegger.service | |
Requires=init.kballenegger.service | |
[Service] | |
Environment=HOME=/root | |
TimeoutStartSec=0 | |
ExecStartPre=/bin/bash /repos/services/web-app/init.sh 1 pre-start | |
ExecStart=/bin/bash /repos/services/web-app/init.sh 1 start |
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
# NOTE: There are two root files which are the entrypoints to compilation for | |
# both JavaScript and CSS. Those files are: | |
# | |
# src/js/app.{js,wisp,jsx} | |
# src/style/style.scss | |
# Tools | |
SHELL := /bin/bash | |
JSX ?= jsx |
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
(React.renderComponent | |
(dom div {:id "one" :class "two"} | |
(dom span {:style {:color :red, :font-weight :bold}} "HELLO ") | |
(dom span {:style {:color :blue}} "WORLD ") | |
"ola" | |
) | |
(document.getElementById "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
#cloud-config | |
# convert this file into json like this: | |
# cat file | ruby -ne 'puts " \"#{$_.gsub("\n","").gsub("\\","\\\\").gsub("\"","\\\"")}\\n\","' | |
coreos: | |
etcd: | |
discovery: https://discovery.etcd.io/... | |
# multi-region and multi-cloud deployments need to use $public_ipv4 | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 |
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
require 'openssl' | |
module SomeNamespace | |
# This module abstracts away the crypto implementation. Internally, it uses | |
# the AES cipher, with a length of 256, in CTR mode. | |
# | |
# The ciphertext and key are Base64 encoded strings. The plaintexts are not | |
# encoded. | |
# |
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
[Unit] | |
Description=API Internal | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
ExecStartPre=/bin/bash /repos/services/api-internal/init.sh pre-start | |
ExecStart=/bin/bash /repos/services/api-internal/init.sh start |
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
# The two above specifies which version of the vagrant API is used. | |
Vagrant.configure('2') do |config| | |
# This is a hack around the networking slowness in the VM. | |
config.vm.provider 'virtualbox' do |vb| | |
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on'] | |
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'on'] | |
vb.customize ['modifyvm', :id, '--natpf1', 'app,tcp,,9977,,9977'] | |
end |