Skip to content

Instantly share code, notes, and snippets.

@mschueler
mschueler / colors.sh
Created June 8, 2012 02:39
color test
#!/bin/bash
T='gYw' # The test text
echo -e "\nvFG \ BG > 40m 41m 42m 43m\
44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+-zsh:12> rvm --trace get head
+rvm:2> local result current_result __rvm_env_unload
+rvm:4> [[ -z 4.3.11 ]]
+rvm:10> [[ 3 -gt 0 ]]
+rvm:10> next_token=--trace
+rvm:10> shift
+rvm:12> [[ 0 == 0 ]]
+rvm:14> __rvm_cleanse_variables
+__rvm_cleanse_variables:2> __rvm_unset_ruby_variables
+__rvm_unset_ruby_variables:3> unset rvm_env_string rvm_ruby_string rvm_ruby_strings rvm_ruby_binary rvm_ruby_gem_home rvm_ruby_gem_path rvm_ruby_home rvm_ruby_interpreter rvm_ruby_irbrc rvm_ruby_log_path rvm_ruby_major_version rvm_ruby_minor_version rvm_ruby_package_name rvm_ruby_patch_level rvm_ruby_release_version rvm_ruby_repo_url rvm_ruby_repo_branch rvm_ruby_revision rvm_ruby_selected_flag rvm_ruby_tag rvm_ruby_version rvm_ruby_load_path rvm_ruby_require rvm_head_flag rvm_ruby_package_file rvm_ruby_configure rvm_ruby_name rvm_ruby_url rvm_ruby_global_gems_path rvm_ruby_args rvm_ruby_name rvm_llvm_flag rvm_architectures
[~] rvm get head 12:47:42
/base:source:3: no such file or directory: /base
/version:source:4: no such file or directory: /version
Original installed RVM version:
rvm 1.9.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
mkdir: /rvm: Permission denied
get_head:cd:40: no such file or directory: /rvm
Stevey's Google Platforms Rant
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't really have SREs and they make engi
@mschueler
mschueler / DWM-ON-OS-X.md
Created October 12, 2011 07:13 — forked from vangberg/DWM-ON-OS-X.md
dwm on os x [work in progress!]

Installing and configuring dwm on OS X

  1. Install XQuartz (http://xquartz.macosforge.org) which is the development version of the X11.app that ships with OS X, which means it is way more up to date. I have had some weird issues with X11.app v. 2.3-something. XQuartz 2.5.0 fixed that.

  2. Install dwm from Homebrew, brew install dwm. This makes a bunch of necessary tweaks to the DWM configuration.

  3. Add the following script to $PATH, name it dwm-launch and chmod 755:

    cd ~
    

while true

#!/usr/bin/env ruby
require 'rubygems'
require 'hpricot'
require 'open-uri'
#a Trac repo scraper. pass the url to scrape (the root of a repo)
# and optionally the local path to write to. defaults to .
#!/bin/bash
rgemurl="http://production.cf.rubygems.org/rubygems/"
rgem="rubygems-1.8.5"
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
apt-get update
APT_GET="env DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get -q"
$APT_GET -y remove ruby1.8*
$APT_GET -y install ruby1.9.1 ruby1.9.1-dev libruby1.9.1 libopenssl-ruby1.9.1
$APT_GET -y install build-essential
ln -sf ruby1.9.1 /usr/bin/ruby
ami="ami-116f3c54"
size="m1.small"
region="us-west-1"
key="plabw"
path="/Users/mike/orchestration/west/"
sgroups="-g pl -g pl-www -g st-db -g st-www -g pl-db -g default"
mapping="--block-device-mapping=/dev/sdo=snap-7d4de911:200:false"
#mapping="--block-device-mapping=/dev/sdc=ephemeral0 --block-device-mapping=/dev/sdo=snap-7d4de911:200:false"
@mschueler
mschueler / snippet.txt
Created September 4, 2011 11:47
nicca
']['home'] = "/usr/lib/nagios"
set['nagios']['nrpe']['conf_dir'] = "/etc/nagios"
home'] = "/usr/lib/nagios"
set['nagios']['nrpe']['conf_dir'] = "/etc/nagios"
# for plugin from source installation
default['nagios']['plugins']['url'] = 'http://prdownloads.sourceforge.net/sourceforge/nagiosplug'