This file contains hidden or 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
# A purely .zsh method inspired by Steve Losh's Python script for displaying battery power with zsh: | |
# http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity | |
# | |
# For best results assign to RPROMPT | |
function battery_charge { | |
# Adjust to your preferred number of segments | |
typeset -i SEGMENTS | |
SEGMENTS=10 | |
# Get maximum and current capacity as floats via ioreg |
This file contains hidden or 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/sh | |
# | |
# First install the latest Command Line Tools for Xcode package: | |
# https://developer.apple.com/downloads/index.action?name=command%20line%20tools%20for%20xcode | |
# | |
# You can then run this by either copying and pasting everything into a terminal or running: | |
# bash -s < <(curl -L https://raw.github.com/gist/2026768/konjac_env.sh) | |
# | |
# Install Homebrew |
This file contains hidden or 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
# Install RVM | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) | |
# Tell bash (the terminal) to automatically load RVM, then tell bash to reload | |
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install the latest version of Ruby and set it as the default | |
rvm install 1.9.3 | |
rvm use 1.9.3 --default |
This file contains hidden or 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 | |
=begin | |
To run, copy and paste the following command into a console: | |
ruby < <(curl -s https://raw.github.com/gist/1816919/469a4086833ce3b3496476aef1246c5d81b7ac99/gistfile1.rb) | |
And shucks, if that doesn't work, there's always this: | |
bash --version && \ | |
brew --version && \ | |
bundle --version && \ | |
curl --version && \ |
NewerOlder