This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface LoggerProxy : NSObject | |
{ | |
id original; | |
} | |
- (id)initWithOriginal:(id) value; | |
@end | |
@implementation LoggerProxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define assemble | |
# dont enter routine again if user hits enter | |
dont-repeat | |
if ($argc) | |
if (*$arg0 = *$arg0) | |
# check if we have a valid address by dereferencing it, | |
# if we havnt, this will cause the routine to exit. | |
end | |
printf "Instructions will be written to %#x.\n", $arg0 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" Implement parametric testMethods and testCases for nose and unittest | |
usage for parametric test methods: | |
@parametric | |
class MyTest(unittest.TestCase): | |
@parametric(foo=[1,2],bar=[3,4]) | |
def testWithParams(self,foo,bar): | |
self.assertLess(foo,bar) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'sqlite3' | |
GEMFILE | |
system 'bundle' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h1>This page contains some example of <b>@extend</b> where ther result is non obvious</h1> | |
<h2>Example 1</h2> | |
<span>First button bellow is done via simple col-xs-1 attribute, second done via @extend</span> | |
<div class="small-box"> | |
<div class="row"> | |
<button class="btn col-xs-1">+</button> | |
</div> | |
<div class="row"> | |
<button class="btn col-xs-1-via-extend">+</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'sqlite3' | |
gem 'byebug' | |
GEMFILE | |
system 'bundle' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fixes 'https://github.com/rails/rails/pull/16640' | |
# add this to lib/patches/active_record/autosave_association.rb | |
# then in config/environment.rb before initialize! load this file with | |
# something like: | |
# require File.join(File.dirname(__FILE__), '../lib/patches/active_record/autosave_association.rb') | |
# see https://gist.github.com/mfazekas/cc7792802859d91e3fcb | |
require 'active_record/autosave_association' | |
module ActiveRecord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
#gem 'rails', github: 'rails/rails', branch: '4-2-stable' | |
gem 'rails', '4.2.0.rc2' | |
#gem 'rails', '4.1.8' | |
#gem 'arel', github: 'rails/arel' | |
#gem 'rack', github: 'rack/rack' | |
gem 'i18n', github: 'svenfuchs/i18n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', github: 'rails/rails' | |
gem 'arel', github: 'rails/arel' | |
gem 'sqlite3' | |
gem 'pg' | |
gem 'byebug' | |
GEMFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', '4.1.8' | |
#gem 'rails', '4.2.0.rc3' | |
gem 'sqlite3' | |
gem 'pg' | |
gem 'byebug' | |
GEMFILE |
OlderNewer