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
# Using this file, you prompt looks something like this: | |
# <exit status> <username color coded with dotfiles git status> <cwd> <git branch or rev-name> <job status> $ | |
# 💙 andre ~/src/bundler/bundler v1.3.0.pre.2~13 👥 $ | |
BLUE='\001\033[0;34m\002' | |
CYAN='\001\033[0;36m\002' | |
GREEN='\001\033[0;32m\002' | |
YELLOW='\001\033[0;33m\002' | |
RESET='\001\033[0m\002' |
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
# Homebrew::tap to get dupes | |
define homebrew::tap ( | |
$ensure = present, | |
) { | |
if $ensure == 'present' { | |
exec { "homebrew_tap_${name}": | |
command => "brew tap ${name}", | |
unless => "brew tap | grep ${name}", | |
} |
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
Jul 15 06:05:43 bundler-api heroku/web.6: Cycling | |
Jul 15 06:05:48 bundler-api heroku/web.6: Stopping all processes with SIGTERM | |
Jul 15 06:05:51 bundler-api heroku/web.6: Process exited with status 0 | |
Jul 15 06:05:51 bundler-api heroku/web.6: State changed from up to down | |
Jul 15 06:05:51 bundler-api heroku/web.6: State changed from down to starting | |
Jul 15 06:05:53 bundler-api heroku/web.6: Starting process with command `bundle exec puma --include lib --port 57130 --environment production --threads 0:32` | |
Jul 15 06:05:56 bundler-api heroku/web.6: State changed from starting to up |
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
$keyboard_ids = 'ioreg -n IOHIDKeyboard -r | grep -E \'VendorID"|ProductID\' | awk \'{ print $4 }\' | paste -s -d\'-\n\' -' | |
$check = 'xargs -I{} sh -c \'defaults -currentHost read -g "com.apple.keyboard.modifiermapping.{}-0" | grep "Dst = 2" > /dev/null\'' | |
$remap = 'xargs -I{} defaults -currentHost write -g "com.apple.keyboard.modifiermapping.{}-0" -array "<dict><key>HIDKeyboardModifierMappingDst</key><integer>2</integer><key>HIDKeyboardModifierMappingSrc</key><integer>0</integer></dict>"' | |
exec { 'Remap capslock to control on all keyboards': | |
command => "${keyboard_ids} | ${remap}", | |
unless => "${keyboard_ids} | ${check}" | |
} |
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
# give the child process a terminal so output isn't buffered | |
@master, slave = PTY.open | |
in_clean_environment do | |
@pid = ::Process.spawn( | |
config.env, | |
%Q(bash -c "#{config.command}"), | |
:in => slave, | |
:out => slave, | |
:err => slave, | |
:chdir => config.dir, |
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
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT | |
// file at the top-level directory of this distribution and at | |
// http://rust-lang.org/COPYRIGHT. | |
// | |
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
// option. This file may not be copied, modified, or distributed | |
// except according to those terms. |
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
± aa+rm |ruby2 ✗| → bundle exec ruby reduced.rb | |
This is not nil, it is a PG::Result | |
#<PG::Result:0x007fb632e778a0 @connection=#<PG::Connection:0x007fb632e7fa28>> | |
This is a PG::Result on 1.9.3, but it is nil on Ruby 2.0 because defined?(super) returned nil | |
the value of defined?(super) is: nil | |
nil | |
|ruby-2.0.0-p0| Lyra-Heartstrings-5 in ~/workspace/makara | |
± aa+rm |ruby2 ✗| → rvm use 1.9.3 |
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 | |
# We need tmux. Obvs. | |
if [[ -z `which tmux` ]]; then echo "You need tmux first!"; exit 1; fi | |
# Named variables are much more flexible | |
name="$1" | |
# Make sure we got a session name to create or join | |
[[ -n "$name" ]] || { echo "Usage: tmux-named [SESSION_NAME]"; exit; } |
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
# change tmux prefix from ⌃b to ⌃t | |
unbind C-b | |
set -g prefix C-t | |
# tell tmux that terminal has 256 colors | |
set -g default-terminal "screen-256color" | |
# re-enable pbcopy and pbpaste inside tmux shells | |
set-option -g default-command "reattach-to-user-namespace -l bash" |
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 'yaml' | |
require 'time' | |
APP_KEY = "your app key" | |
APP_SECRET = "your app secret" | |
TOKEN_KEY = nil | |
TOKEN_SECRET = nil | |
lib = File.expand_path("../dropbox-sdk/lib", __FILE__) |