start new:
tmux
start new with session name:
tmux new -s myname
| sourceFiles = [ '*.coffee', 'models/*.coffee', 'views/*.coffee' ] | |
| fullPathSourceFiles = sourceFiles.map (f) -> "app/coffee/" + f | |
| fullPathSpecFiles = sourceFiles.map (f) -> "specs/coffee/" + f | |
| module.exports = (grunt) -> | |
| grunt.initConfig | |
| pkg: grunt.file.readJSON 'package.json' | |
| watch: | |
| coffee: | |
| files: fullPathSourceFiles.concat(fullPathSpecFiles) |
| ## Managing RequireJS Dependency Arrays | |
| define ['jQuery','Backbone','Handlebars','AModel'], ($, _, Backbone, HB, AModel) -> | |
| ... | |
| ## VERSUS Node style requires.. | |
| define (require) -> | |
| $ = require 'jQuery' | |
| Backbone = require 'Backbone' |
| # Found at: /usr/local/Cellar/qt/4.8.6/mkspecs/common/g++-macx.conf | |
| # | |
| # Qmake configuration for the GNU C++ compiler on Mac OS X | |
| # | |
| # Before making changes to this file, please read the comment in | |
| # gcc-base.conf, to make sure the change goes in the right place. | |
| # | |
| # To verify that your change has the desired effect on the final configuration | |
| # you can use the manual test in tests/manual/mkspecs. | |
| # |
| RSpec::Matchers.define :have_sidekiq_options do |options| | |
| match do |actual| | |
| description { "has correct sidekiq options" } | |
| options.each do |key,value| | |
| #sidekiq options have stringified keys | |
| break false unless actual.sidekiq_options_hash[key.to_s] == value | |
| end | |
| end | |
| end |
| require 'rails_helper' | |
| feature 'Confirmation Group Payment With Remission', type: :feature do | |
| attr_reader :claim, :recipients, :email, :body | |
| before :all do | |
| @claim = create :claim, :group_payment_with_remission | |
| @recipients = ["me@example.com"] | |
| @email = BaseMailer.confirmation_email(claim, recipients).deliver_now | |
| @body = email.parts.first.body.raw_source |
| defmodule FizzBuzz do | |
| for {word, remainder} <- [{"FizzBuzz", 15}, {"Fizz", 3}, {"Buzz", 5}] do | |
| def compute(num) when rem(num, unquote(remainder)) == 0, do: unquote(word) | |
| end | |
| def compute(num), do: num | |
| end | |
| 1..100 |> Enum.map(&FizzBuzz.compute/1) |
| require 'rubygems' | |
| require 'active_support/time' | |
| require 'clockwork' | |
| require 'twilio-ruby' | |
| require 'logger' | |
| class WeekdayTimeKeeper | |
| START_WORK_DAY = 10.hours.freeze | |
| END_WORK_DAY = 17.hours.freeze |
| session = Bunny.new( | |
| Sneakers::CONFIG[:amqp], | |
| heartbeat: Sneakers::CONFIG[:heartbeat], | |
| vhost: Sneakers::CONFIG[:vhost]) | |
| session.connected? # => false | |
| session.start # connects to rabbit | |
| session.connected? # => true | |
| session.close # closes the connection | |
| session.connected? # => false |
| require 'minitest/autorun' | |
| # This should pass.. | |
| describe 'Immutable prison data' do | |
| let(:prison_name) { 'Wandsworth' } | |
| def test_data_is_treated_immutable | |
| prison1 = Prison.find prison_name |