An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
| <?php | |
| /** | |
| * Customer Reset Password email | |
| * | |
| * @author WooThemes | |
| * @package WooCommerce/Templates/Emails | |
| * @version 2.0.0 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> |
| set :shared_children, shared_children << 'tmp/sockets' | |
| namespace :deploy do | |
| desc "Start the application" | |
| task :start, :roles => :app, :except => { :no_release => true } do | |
| run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false | |
| end | |
| desc "Stop the application" | |
| task :stop, :roles => :app, :except => { :no_release => true } do |
| /** | |
| * supplant() does variable substitution on the string. It scans through the string looking for | |
| * expressions enclosed in { } braces. If an expression is found, use it as a key on the object, | |
| * and if the key has a string value or number value, it is substituted for the bracket expression | |
| * and it repeats. | |
| * | |
| * Written by Douglas Crockford | |
| * http://www.crockford.com/ | |
| */ | |
| String.prototype.supplant = function (o) { |
An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
| # current_account.posts.visible_to(current_user) | |
| module Visible | |
| extend ActiveSupport::Concern | |
| module ClassMethods | |
| def visible_to(person) | |
| where \ | |
| "(#{table_name}.bucket_id IN (?) AND | |
| #{table_name}.bucket_type = 'Project') OR | |
| (#{table_name}.bucket_id IN (?) AND |
| $(function() { | |
| initPage(); | |
| }); | |
| $(window).bind('page:change', function() { | |
| initPage(); | |
| }) |
| apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev |
| sudo update-rc.d unicorn defaults |
| rvmsudo gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-head/ |
| javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "\n"; } } if (s) alert("Passwords in forms on this page:\n\n" + s); else alert("No password form :(.");})(); |