start new:
tmux
start new with session name:
tmux new -s myname
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 |
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 '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 = ["[email protected]"] | |
@email = BaseMailer.confirmation_email(claim, recipients).deliver_now | |
@body = email.parts.first.body.raw_source |
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 |
# 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. | |
# |
## Managing RequireJS Dependency Arrays | |
define ['jQuery','Backbone','Handlebars','AModel'], ($, _, Backbone, HB, AModel) -> | |
... | |
## VERSUS Node style requires.. | |
define (require) -> | |
$ = require 'jQuery' | |
Backbone = require 'Backbone' |
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) |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Base</title> | |
<!-- Styles --> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap.css"></link> | |
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/css/bootstrap-responsive.css"></link> | |
(function() { | |
var root = this; | |
var BackboneMock = (function() { | |
if(typeof Backbone === 'undefined') { | |
throw '"Backbone" is undefined, make sure you have loaded ' + | |
'backbone.js before using this mock utility'; | |
} | |
// Override Backbone.sync | |
// because we want to mock the requests |