Skip to content

Instantly share code, notes, and snippets.

View joeybeninghove's full-sized avatar

Joey Beninghove joeybeninghove

View GitHub Profile
IQuery query;
if (printer.IsTransient)
query = new Queries.Insert(printer);
else
query = new Queries.Update(printer);
C:\Windows\SysWOW64\cmd.exe /c ""C:\Program Files (x86)\Git\bin\sh.exe" --login -i"
;=======================================================================================
;BDD Test Naming Mode AHK Script
;
;Description:
; Replaces spaces with underscores while typing, to help with writing BDD test names.
; Toggle on and off with Ctrl + Shift + Alt + U.
;=======================================================================================
;==========================
;Initialize
gems:
autotest (4.2.9)
autotest-growl (0.2.4)
autotest-rails (4.1.0)
cucumber (0.7.0.beta.8)
cucumber-rails (0.3.0)
database_cleaner (0.5.2)
gherkin (1.0.22)
mongoid (2.0.0.beta4)
rspec (2.0.0.beta.8)
# cucumber
Before do
Mongoid.master.collections.each(&:drop)
end
# rspec
config.before(:each) do
Mongoid.master.collections.each(&:drop)
end
begin
require 'rspec/core'
require 'rspec/core/rake_task'
rescue MissingSourceFile
module Rspec
module Core
class RakeTask
def initialize(name)
task name do
# if rspec-rails is a configured gem, this will output helpful material and exit ...
#!/usr/bin/env ruby
##
# Originally from http://www.pragmaticautomation.com/cgi-bin/pragauto.cgi/Monitor/StakingOutFileChanges.rdoc
# Modified by Geoffrey Grosenbach http://peepcode.com
#
# Watches files and runs a command when any of them are modified.
#
# If one argment is given, will run that command and watch app, lib, test, spec.
#
%ul.check_box_list
- @groups.each do |group|
%li
= check_box_tag "user[group_ids][#{group.id}]", group.id, @user.groups.include?(group)
= label_tag "user[group_ids][#{group.id}]", group.name
class Group
include Mongoid::Document
include Mongoid::Timestamps
has_many_related :applicants
validates_presence_of :name
validates_uniqueness_of :name, :message => "already exists"
field :name
~ > rvm list
Usage: grep [OPTION]... PATTERN [FILE] ...
Search for PATTERN in each FILE or standard input.
Example: grep -i 'hello world' menu.h main.c
Regexp selection and interpretation:
-E, --extended-regexp PATTERN is an extended regular expression
-F, --fixed-strings PATTERN is a set of newline-separated strings
-G, --basic-regexp PATTERN is a basic regular expression
-P, --perl-regexp PATTERN is a Perl regular expression