start new:
tmux
start new with session name:
tmux new -s myname
| @submissions = Submission.all.sort_by { |s| s.favorites.count } | |
| File.open("favorites_list.txt", "w") do |file| | |
| @submissions.each do |submission| | |
| file << submission.name + " - Favorites: " + submission.favorites.count.to_s + "\n" | |
| end | |
| end |
| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://gist.github.com/1595572). | |
| # |
Couldn't find the text of this for a while...
| $ -> | |
| $("div.contacts form").live "ajax:success", -> | |
| $.get window.pathname, (data) => | |
| $(this).closest("div.contacts").replaceWith $(data).find("div.contacts") |
Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).
Other application notes:
Salient points for each file:
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| execute pathogen#infect() | |
| syntax enable | |
| set hidden | |
| set t_Co=256 " enable 256 color support | |
| set textwidth=80 " set the textwidth char to wrap at | |
| set ts=2 " set the tab spacing to be 2 chars | |
| set shiftwidth=2 " set the shiftwidth to be 2 chars | |
| set wrapmargin=0 | |
| set number " display line numbers | |
| set expandtab |
| source 'https://rubygems.org' | |
| gem 'rack-attack', :ref => '1c01e6097ce18f486d887ebbeb9f0c4b434cd8f5', :git => 'https://github.com/kickstarter/rack-attack.git' | |
| gem 'redis-activesupport' |