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
ls --almost-all | head --lines=-1 | xargs rm -r |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.network :forwarded_port, guest: 3000, host: 3000 | |
config.vm.box = "precise" |
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 | |
# | |
# Syncs Ruby binstubs for ruby-communal-gems. | |
# Run this everytime you install a new Ruby, or when you install a new gem | |
# with a bin/ command. (ie, when you typically do rbenv rehash) | |
# | |
# See: https://github.com/tpope/rbenv-communal-gems/issues/5 | |
# | |
require 'fileutils' |
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
### Keybase proof | |
I hereby claim: | |
* I am jamesmoriarty on github. | |
* I am jamesmoriarty (https://keybase.io/jamesmoriarty) on keybase. | |
* I have a public key whose fingerprint is 06A1 9318 4CA2 F3A0 BDA4 1B17 0062 ED6D CBAF BEEF | |
To claim this, I am signing this object: |
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
1. go to http://dl.hhvm.com/ubuntu/pool/main/h/hhvm/ and right click and copy the link to the version of hhvm you want to rollback to | |
2. sudo apt-get autoremove hhvm -y | |
3. wget <link you just copied> | |
4. sudo dpkg -i <name of file u just downloaded> | |
5. apt-get install -f | |
6. service hhvm start | |
Edit: Don't worry when it errors out on step 4. that is expected. just continue to step 5. |
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 'pty' | |
require 'optparse' | |
unless ENV['USER'].eql?("root") | |
puts "Must be run as root.\nFailed." | |
exit | |
end | |
options = {} |
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 'benchmark' | |
N_OPS = 100_000_000 | |
N_THREADS = 10 | |
BM_LABEL_WIDTH = 15 | |
def func(n_ops) | |
(1..n_ops).each { 1 + 1 } | |
end |
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
before "newrelic:server_monitor:install", "newrelic:server_monitor:uninstall" | |
namespace :newrelic do | |
namespace :server_monitor do | |
task :install, :roles => :web do | |
run "curl -o ~/newrelic-sysmond-1.1.2.124-linux.tar.gz http://download.newrelic.com/server_monitor/release/newrelic-sysmond-1.1.2.124-linux.tar.gz" | |
run "tar xzvf ~/newrelic-sysmond-1.1.2.124-linux.tar.gz" | |
sudo "cp ~/newrelic-sysmond-1.1.2.124-linux/daemon/nrsysmond.x64 /usr/local/bin/nrsysmond" | |
sudo "cp ~/newrelic-sysmond-1.1.2.124-linux/scripts/nrsysmond-config /usr/local/bin" | |
sudo "mkdir -p /etc/newrelic /var/log/newrelic" | |
sudo "chmod 1777 /etc/newrelic /var/log/newrelic" |
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
## | |
# Bash customizations | |
## | |
export CLICOLOR=1 # Enable color shell | |
export LSCOLORS=ExFxCxDxBxegedabagacad # Define colors | |
export COLOR_RED="\e[0;31m" | |
export COLOR_PINK="\e[35;1m" | |
export COLOR_NORMAL="\e[m" |
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
command W w !sudo tee % > /dev/null |
OlderNewer