start new:
tmux
start new with session name:
tmux new -s myname
| <?php | |
| add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' ); | |
| /** | |
| * Example callback function that demonstrates how to properly enqueue conditional stylesheets in WordPress for IE. | |
| * IE10 and up does not support conditional comments in standards mode. | |
| * | |
| * @uses wp_style_add_data() WordPress function to add the conditional data. | |
| * @link https://developer.wordpress.org/reference/functions/wp_style_add_data/ |
| <?xml version="1.0"?> | |
| <root> | |
| <appdef> | |
| <appname>Terminal</appname> | |
| <equal>com.apple.Terminal</equal> | |
| </appdef> | |
| <item> | |
| <name>TMUX Key Remappings</name> | |
| <item> | |
| <name>TMUX: Right Control to Ctrl+B</name> |
| require 'socket' | |
| module EventEmitter | |
| def _callbacks | |
| @_callbacks ||= Hash.new { |h, k| h[k] = [] } | |
| end | |
| def on(type, &blk) | |
| _callbacks[type] << blk | |
| self |
This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.
# Ensure system is in ship-shape.
aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev
| require 'csv' | |
| require 'mongo' | |
| path = "#{Rails.root}/db/seeds/" | |
| db = Mongo::Connection.new.db('database_name') | |
| Dir.open(path).each do |f| | |
| if f.match(/(.*)\.csv$/) | |
| col = db.collection($1) | |
| col.remove |
| task :environment do | |
| require './dj-sinatra' | |
| end | |
| namespace :jobs do | |
| desc "Clear the delayed_job queue." | |
| task :clear => :environment do | |
| Delayed::Job.delete_all | |
| end |
| # RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
| # defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
| module Player | |
| describe MovieList, "with optional description" do | |
| it "is pending example, so that you can write ones quickly" | |
| it "is already working example that we want to suspend from failing temporarily" do | |
| pending("working on another feature that temporarily breaks this one") |