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
# Reset the password of any user in Mac OS X 10.4. | |
# Boot into single user mode pressing and holding Ctrl + S after pressing the power button. | |
# When the root prompt appeats, do: | |
sh /etc/rc | |
passwd admin | |
reboot |
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 Locomotive CMS's wagon and engine | |
# Ruby version used: ruby-2.1.1 [ i686 ] RVM | |
# Depends: mongo, imagemagick | |
# Wagon | |
# See http://doc.locomotivecms.com/get-started/install-wagon#linux | |
gem install locomotivecms_wagon | |
# Engine |
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
# https://no0p.github.io/postgresql/2014/03/29/upgrading-pg-ubuntu.html |
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
# Run a Ruby script every minute. | |
# Use the Ruby provided by rbenv. | |
# | |
# Edit with crontab -e. | |
*/1 * * * * /bin/bash -c 'export PATH=$HOME/.rbenv/shims:$HOME/.rbenv/bin:"$PATH"; eval "$(rbenv init -)"; cd $HOME/path/to/script/; ruby ./graph.rb > /output/path/index.html' |
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 sepastian on github. | |
* I am sepastian (https://keybase.io/sepastian) on keybase. | |
* I have a public key whose fingerprint is 214D 35E9 65E8 6DDF AFE4 F388 03AB E849 A825 7946 | |
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
# Install rbenv. | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
mkdir ~/.rbenv/cache | |
# Install ruby-build. | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
# Install Debian dependencies. | |
sudo apt-get update | |
sudo apt-get --assume-yes install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev |
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
# Record the screen using avconv. | |
avconv -f x11grab -r 25 -s 1920x1080 -i :0.0 -vcodec libx264 -threads 4 output.avi |
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 | |
set -o nounset | |
set -o errexit | |
set -o pipefail | |
PHOTO_DIR="$1" | |
ARCHIVE_DIR="$2" | |
if [ $# != 2 ] | |
then |
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
# Use with `rails new -m https://gist.githubusercontent.com/sepastian/8d9bf523d3950d4c8a4d/raw/88fd29455af48f5d99569063a6239b5dcdac3d96/rails_4.2_default.rb -d postgresql` | |
require 'fileutils' | |
if Rails.version !~ /\A4\.2/ | |
puts "Required: Rails 4.2.x; found: Rails #{Rails.version}." | |
puts "$ bundle update rails" | |
exit 2 | |
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
# Compiling Ruby 1.8.4 with Tk from source under Ubuntu 13.04 | |
# Install Rubygems 0.9.0 from source and various gems | |
# Download sources | |
~$ cd build | |
~/build$ wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.4.tar.gz | |
~/build$ wget http://prdownloads.sourceforge.net/tcl/tcl8.5.14-src.tar.gz | |
~/build$ wget http://prdownloads.sourceforge.net/tcl/tk8.5.14-src.tar.gz | |
~/build$ wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz | |
~/build$ tar xf ruby-1.8.4.tar.gz |
OlderNewer