-
Install nightly build of cargo. (rustfmt requires cargo 0.6.0 or newer)
$ curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
-
Then install rustfmt,
$ cargo install --git https://github.com/rust-lang-nursery/rustfmt
-
Install emacs-rustfmt
View postgresql.yml
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
--- | |
name: postgresql | |
product_version: 0.0.0.1 | |
metadata_version: '1.3' | |
target_installer_version: 1.0 | |
stemcell: | |
name: bosh-vsphere-esxi-ubuntu-trusty-go_agent | |
version: '2824' | |
file: bosh-stemcell-2824-vsphere-esxi-ubuntu-trusty-go_agent.tgz | |
md5: e42cf8db9f1a471ed062ff2c6723427a |
View load_consul.rb
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 'yaml' | |
require 'diplomat' | |
RAILS_ENV = ARGV[0] | |
x = YAML.load_file ARGV[1] | |
y = x.reduce({}) do |acc, (k, v)| | |
o = "#{RAILS_ENV}/#{k.downcase}" |
View 1407.rb
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 'tempfile' | |
require 'fileutils' | |
ARGV.each do |name| | |
temp_file = Tempfile.new('foo') | |
begin | |
File.open(name, 'r') do |file| | |
file.each_line do |l| |
View htop.sh
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
cd /tmp | |
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm | |
rpm -ihv rpmforge-release*.rf.i686.rpm | |
yum -y install htop |
View tmux-session.sh
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 bash | |
# Save and restore the state of tmux sessions and windows. | |
# TODO: persist and restore the state & position of panes. | |
set -e | |
dump() { | |
local d=$'\t' | |
tmux list-windows -a -F "#S${d}#W${d}#{pane_current_path}" | |
} |
View rust.md
View my-outerspace.xpm
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
/* XPM */ | |
static char * outerspace_xpm[] = { | |
"8 15 2 1", | |
" c None", | |
". c #333333", | |
"........", | |
"........", | |
"........", | |
"........", | |
"........", |
View my-nyan.xpm
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
/* XPM */ | |
static char * nyan_xpm[] = { | |
"25 15 149 2", | |
" c None", | |
". c #522244", | |
"+ c #3F1E31", | |
"@ c #403326", | |
"# c #2C2F32", | |
"$ c #002D5B", | |
"% c #333333", |
View idris-typechecker.log
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
Elaborating Main.SplitView | |
Cryptol.idr:83:6 | |
Main.SplitView pre-type {n : Nat} -> | |
(m : Nat) -> | |
Vect (mult m | |
n) | |
a -> | |
Type[] | |
Main.SplitView type [] | |
{a : _} -> |
View server.json
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
{ | |
"bootstrap": true, | |
"server": true, | |
"datacenter": "con", | |
"data_dir": "/tmp/consul", | |
"encrypt": "yJqVBxe12ZfE3z+4QSk8qA==", | |
"log_level": "INFO", | |
"enable_syslog": true, | |
"ui_dir": "~/consul_config/dist", | |
"acl_datacenter": "con", |
OlderNewer