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 'nokogiri' | |
require 'open-uri' | |
require 'terminal-notifier' | |
title = 'Bitcoin Gem' | |
activate = 'com.googlecode.iterm2' | |
current_price = 0 | |
while 1 |
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
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} | |
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} | |
audio:not([controls]){display:none;} | |
html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} | |
a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} | |
a:hover,a:active{outline:0;} | |
sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} | |
sup{top:-0.5em;} | |
sub{bottom:-0.25em;} | |
img{max-width:100%;height:auto;border:0;-ms-interpolation-mode:bicubic;} |
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
# Create a symlink to the nginx bin file | |
sudo ln -s /opt/nginx/sbin/nginx /usr/local/sbin/ | |
# Change the PID location | |
sudo vim /opt/nginx/conf/nginx.conf | |
pic /var/run/nginx.pid | |
# Go to the init.d folder | |
cd /etc/init.d/ |
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
# Enter the root account | |
sudo su | |
# Set your applications gemset | |
rvm gemset use MyAppName | |
# Install passenger | |
gem install passenger | |
# Install passenger module along with nginx |
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
# Add your server's rsa public key to github (http://github.com/settings/ssh) | |
cat .ssh/id_MyAppName_rsa.pub | |
# Download your application to your home dir | |
git clone <repo> | |
# Enter your aplications folder | |
cd MyAppName/ | |
# Go as root user |
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
# Install Git and Curl | |
sudo apt-get install git curl | |
# Install RVM from the website. It has to be Multiuser mode | |
curl -L https://get.rvm.io | sudo bash -s stable | |
# Add root and your user to the rvm group | |
sudo adduser root rvm | |
sudo adduser MyAppName rvm |
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
# Some steps were taken from: http://blog.sofasurfer.org/2011/07/16/ubuntu-ec2-add-new-admin-user/ | |
# Create new user and follow the steps | |
sudo adduser MyAppName | |
# Add the user to the admin group to have sudo access | |
sudo adduser MyAppName admin | |
# If you want to allow sudo access without password (Insecure) | |
sudo visudo |
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
MAIN_DIR="parent/dir/here/" && for dir in "$MAIN_DIR"*/; do cd "$dir"; for f in *.m4a; do alac-decoder -v -f "$(basename "$f" .m4a).wav" "$f"; done; cd ..; done; && find "$MAIN_DIR" -name "*.m4a" -delete |
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 | |
echo "Breacking file into tracks..." | |
cuebreakpoints *.cue | shnsplit -o flac *.flac | |
echo "Converting flac tracks to ogg quality 9..." | |
oggenc -q9 split-track*.flac | |
echo "Tagging files with info from the cue sheet..." | |
cuetag *.cue split-track*.ogg | |
sleep 7 | |
echo "Renaming files according to tags..." |
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 | |
echo "Breaking file into tracks..." | |
cuebreakpoints *.cue | shnsplit -o flac *.ape | |
echo "Converting flac tracks to ogg quality 9..." | |
oggenc -q9 split-track*.flac | |
echo "Tagging files with info from the cue sheet..." | |
cuetag *.cue split-track*.ogg | |
sleep 7 | |
echo "Renaming files according to tags..." |