View install-ruby.sh
#!/bin/sh | |
# Install Ruby on Ubuntu 12.04 with rbenv to manage | |
sudo apt-get install build-essential ruby-dev zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-dev git-core libsqlite3-dev libxslt-dev libxml2-dev libpq-dev | |
rm -rf .rbenv | |
cd | |
git clone git://github.com/sstephenson/rbenv.git .rbenv |
View install-rails.sh
#!/bin/sh | |
# Install Ruby 1.9.3 on rbenv and get Rails | |
cd | |
mkdir -p .rbenv/plugins | |
cd .rbenv/plugins | |
git clone git://github.com/sstephenson/ruby-build.git | |
cd |
View install-sublime.sh
#!/bin/sh | |
# Script to install a downloaded 'Sublime Text 2' editor. | |
# Make sure you follow the editors license | |
if [ -z "$1" ] | |
then | |
echo "\n Function usage:" | |
echo " $ ./install-sublime.sh Sublime\ Text\ 2.0.1.tar.bz2" | |
echo "\n (replace tar.bz2 file with correct name)" |
View install-updates.sh
#!/bin/sh | |
# Script to install system-wide updates | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get dist-upgrade | |
sudo apt-get autoremove | |
sudo apt-get clean |
View What.java
// ... | |
catMedia = (categoryId==157)?getCategoryMedia1():getCategoryMedia(); | |
// ... |
View com.company.launchd.apache2.plist
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.company.launchd.apache2</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/apache2/bin/apachectl</string> | |
<string>start</string> |
View giffy
#!/usr/bin/env bash | |
if [[ ! -f "$1" ]]; then | |
echo "=> Movie file not found" | |
exit 1 | |
fi | |
tempfile=/tmp/output.gif | |
rm -f $tempfile |
View .bash_profile
# USE IF YOU HAVE | |
#export JAVA15_HOME="/System/Library/Java/JavaVirtualMachines/1.5.0/Contents/Home/" | |
#export PATH=${JAVA15_HOME}/bin:$PATH | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
export PATH=${JAVA_HOME}/bin:$PATH | |
#export MAVEN_OPTS="-Xmx1024m -Xms1024m -XX:MaxPermSize=1162m" | |
#export M2_HOME=/usr/local/apache-maven-2.2.1 | |
#export M2=$M2_HOME/bin | |
#export PATH=$M2:$PATH | |
export M2_HOME=/Applications/apache-maven-3.2.3 |
View async_load.text
(function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.async = true; e.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s); })(); |
View install-git-completion.sh
GIT_VERSION=`git --version | awk '{print $3}'` | |
URL="https://raw.github.com/git/git/v$GIT_VERSION/contrib/completion/git-completion.bash" | |
OTHER_URL="https://raw.githubusercontent.com/git/git/v$GIT_VERSION/contrib/completion/git-completion.bash" | |
PROFILE="$HOME/.profile" | |
echo "Downloading git-completion for git version: $GIT_VERSION..." | |
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then | |
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1 |
OlderNewer