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
@CompileStatic | |
abstract class MagnusProperty<T> { | |
final String key; | |
MagnusProperty(String key) { | |
assert key : "No key provided!" | |
this.key = key | |
} |
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
@postcondition(http_code_error) | |
def ptest_bauth(base_url=config['base_url'], action='post', user=config['puser'], | |
pw=config['ppw'], header=config['pauth_header'], token=''): | |
valid_actions = ['post', 'delete'] | |
if action not in valid_actions: | |
assert False, "framework error: action is not in " + str(valid_actions) |
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
var function_template = function(method,cssClass,attr) { | |
return $(this.bulkUpdateEle)[method](cssClass).data(attr); | |
}; | |
var foo_the_bars = _.partial(function_template, "foo", "bar"); | |
var baz = _.partial(function_template, "baz"); | |
foo({value1:true}); | |
baz("quux", {value1:true}); | |
foo({value2:false}); |
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
# Starts on line 91 in uglifier-2.5.0 | |
# Initialize new context for Uglifier with given options | |
# | |
# options - Hash of options to override Uglifier::DEFAULTS | |
def initialize(options = {}) | |
(options.keys - DEFAULTS.keys - [:comments, :squeeze, :copyright])[0..1].each do |missing| | |
raise ArgumentError.new("Invalid option: #{missing}") | |
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
$(".foo").attr('bar', true); |
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
# I don't think these database names are wrong, but you should be able to get the idea | |
class ActiveRecord::Migration | |
def self.whSalesDbName | |
return "DevSalesDb" if(ENV['NODE_ENV'] != "production") | |
return "SalesDb" | |
end | |
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
/** | |
* The base class for models. | |
* | |
* @param <T> The type of the model under test. | |
*/ | |
public abstract class ModelTestBase<T extends Serializable> { | |
/** | |
* Responsible for generating a test instance. | |
* |
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
// The first time you run this, it will take a very long, annoyingly silent pause while it loads libraries | |
@Grapes([ | |
@Grab("org.gebish:geb-core:0.9.3"), | |
@Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.41.0"), | |
@Grab("org.seleniumhq.selenium:selenium-support:2.41.0") | |
]) | |
import geb.Browser | |
Browser.drive { |
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
<!-- | |
In your SCSS file: | |
.bootstrap { | |
// All your bootstrap specific SCSS here | |
} | |
--> | |
<body class="bootstrap"> | |
<!-- | |
Widgets here will get "bootstrap"-namespaced styling |
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
lazybones$ gradle -i --stacktrace publishAllTemplates | |
Starting Build | |
Settings evaluated using empty settings script. | |
Projects loaded. Root project using build file '/Users/RCFischer/webonise/lazybones/build.gradle'. | |
Included projects: [root project 'lazybones'] | |
Evaluating root project 'lazybones' using build file '/Users/RCFischer/webonise/lazybones/build.gradle'. | |
All projects evaluated. | |
Selected primary task 'DefaultTaskParameter{taskName='publishAllTemplates',projectPath='null'}' | |
Tasks to be executed: [task ':packageTemplateExtGeb', task ':publishTemplateExtGeb', task ':publishAllTemplates'] | |
:packageTemplateExtGeb (Thread[main,5,main]) started. |
OlderNewer