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
| #step 1 | |
| yum -y install python-setuptools | |
| #step 2 | |
| rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm | |
| # or | |
| # rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm | |
| #step 3 | |
| # if you using centOS 6.2 enable rpmforge-extras (enabled =1) |
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
| ~/.ssh/config: | |
| Host myrepo | |
| User git | |
| Port <port number> | |
| Hostname <hostname.com> |
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
| curl https://raw.github.com/gist/1588091/8b7b7a203074231f3dc75bdee48b3017078fb621/CentOS-Base.repo -o /etc/yum.repos.d/CentOS-Base.repo | |
| curl https://raw.github.com/gist/1588091/2e5ab750cd0603dd7210ea7a999d15f9aadae711/epel.repo -o /etc/yum.repos.d/epel.repo |
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
| gem install ruby-debug19 | |
| curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
| curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem | |
| gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`" | |
| # rvm tools strings | |
| # gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/home/kir/.rvm/src/ruby-1.9.3-p0/ |
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
| # assumes 1.9.3-p0 is already installed in RVM (1.9.2) and you are in an empty gemset | |
| curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
| curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem | |
| gem install rake | |
| gem install archive-tar-minitar | |
| gem install ruby_core_source | |
| gem install columnize | |
| gem install linecache19-0.5.13.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`" | |
| gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`" |
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
| libreoffice --headless -convert-to pdf fileToConvert.docx -outdir output/path/for/pdf |
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
| apt-get -y install build-essential m4 libncurses5-dev libssh-dev unixodbc-dev libgmp3-dev libwxgtk2.8-dev libglu1-mesa-dev fop xsltproc default-jdk | |
| mkdir -p /src/erlang | |
| cd /src/erlang | |
| wget http://www.erlang.org/download/otp_src_R14B03.tar.gz | |
| tar -xvzf otp_src_R14B03.tar.gz | |
| chmod -R 777 otp_src_R14B03 | |
| cd otp_src_R14B03 | |
| ./configure | |
| make | |
| make install |
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
| class DownloadsController < ApplicationController | |
| DOWNLOAD_EXPIRY = 30.minutes | |
| DOWNLOAD_SECRET = "MYSECRET" | |
| def show | |
| download = Download.find(params[:id]) | |
| # download.file_path - get the path to the file, relative to the downloads directory | |
| serve_file(download.file_path) | |
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
| #vim Gemfile | |
| source 'http://rubygems.org' | |
| gem 'sinatra' | |
| gem 'shotgun' | |
| gem 'haml' | |
| gem 'sass' | |
| gem 'unicorn' |
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
| rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..' | |
| rails_env = ENV['RAILS_ENV'] || 'development' | |
| resque_config = YAML.load_file(rails_root + '/config/resque.yml') | |
| Resque.redis = resque_config[rails_env] | |
| #secure the admin view of resque | |
| Resque::Server.use(Rack::Auth::Basic) do |user, password| | |
| password == "secret" | |
| end |