Skip to content

Instantly share code, notes, and snippets.

View ignu's full-sized avatar
🏳️‍🌈
interested in: react/typescript rails/ruby elixir & graphql

Leonard Smith ignu

🏳️‍🌈
interested in: react/typescript rails/ruby elixir & graphql
View GitHub Profile
$("#ui-datepicker-div").addClass("promoteZ");
CSS:
.promoteZ {
z-index: 2006; /* Dialog z-index is 1006*/
}
def save
@campsite = Campsite.new(self.params[:campsite])
@campsite.save!
redirect_to "/campgrounds/#{@campsite.name}/campsites"
end
git svn clone svn://svn-url --trunk=trunk --branches=branches --tags=tag
git checkout -b TrunkLocal trunk
git checkout -b LiveLocal live
[from Live Branch]
git merge TrunkLocal --no-ff
# git svn actually ties to remote branches via the commit history, so if you get the url to the trunk in your live branch, you'll commit to it... --no-ff prevents that
Scenario: Log in
Given I am registered as 'Tony' with password 'ABC123'
When I go to the login page
And I fill in "username" with "Tony"
And I fill in "password" with "ABC123"
And I press "submit"
Then I should be on the survey start page
# Works!
@ignu
ignu / linq.js
Created September 27, 2009 00:32 — forked from nkohari/linq.js
/*
linq.js -- a simple LINQ implementation for javascript
Author: Nate Kohari <nate@enkari.com>
Copyright (C) 2009 Enkari, Ltd.
Released under the Apache 2.0 license (http://www.opensource.org/licenses/apache2.0.php)
*/
Array.prototype.all = function(func) {
var result = true;
this.iterate(function(item) {
dealer.player = false
add_round do
players.each {|p| p.bet}
deal players 1.up
deal dealer 1.down
deal all 1.up
end
add_round do
class Goal
include DataMapper::Resource
property :id, Serial
property :name, String
has n, :targeting_goals
end
SELECT
RC.Constraint_Name AS FK_Constraint,
RC.Constraint_Catalog AS FK_Database,
CCU.Table_Name AS FK_Table,
CCU.Column_Name AS FK_Column,
RC.Unique_Constraint_Name AS PK_Constraint,
RC.Unique_Constraint_Catalog AS PK_Database,
RC.Unique_Constraint_Schema AS PK_Schema,
CCU2.Table_Name AS PK_Table,
CCU2.Column_Name AS PK_Column,
[TestFixture]
public class WebServiceTest
{
[Test]
public void should_call_authentication_service()
{
service.MyMethod();
Verify<IAuthenticationService>(a => a.Authenticate(username, password)).WasCalled();
}
}
var myObject = function() {
var firstname; // my closure var
var self = {};
self.setFirstName = function(fname) {
firstname = fname
};
return self;
}