Skip to content

Instantly share code, notes, and snippets.

class Program
{
static void Main()
{
int foo = 123;
object bar = foo;
Console.WriteLine(foo.ToString() + " - " + bar);
}
}
.method private hidebysig static void Main() cil managed
{
.entrypoint
// Code size 45 (0x2d)
.maxstack 3
.locals init ([0] int32 foo,
[1] object bar)
IL_0000: nop
IL_0001: ldc.i4.s 123
IL_0003: stloc.0
.method private hidebysig static void Main() cil managed
{
.entrypoint
// Code size 36 (0x24)
.maxstack 3
.locals init ([0] int32 foo,
[1] object bar)
IL_0000: nop
IL_0001: ldc.i4.s 123
IL_0003: stloc.0
//How could you make this code more efficient?
class Program
{
static void Main()
{
int foo = 123;
object bar = foo;
Console.WriteLine(foo + " - " + (int)bar);
(1..1000).each do |i|
%x[say \"Go make me a cup of tea\"]
end
Given javascript is enabled
But the browser culture is "de-DE"
And javascript is disabled
But the browser culture is "en-GB" and javascript is disabled
Given /^javascript is (.*)/ do |state|
page.driver.javascript = state == "enabled"
end
Given /^the browser culture is (.*)/ do |language|
page.driver.language = language
end
Given /^the browser culture is "([^\"]*)" and javascript is (.*)$/ do |culture, javascript|
page.driver.javascript_and_language_are(javascript == "enabled", culture)
@jhollingworth
jhollingworth / gist:767967
Created January 6, 2011 14:56
Set browser language and/or whether javascript is disabled in capybara
require 'capybara'
require 'capybara\dsl'
require 'selenium-webdriver'
class Capybara::Driver::Selenium < Capybara::Driver::Base
def javascript=(javascript)
update_profile(javascript, @language || "en-GB") if @javascript != javascript
end
class FileCleanerAppender : RollingFileAppender
{
public FileCleanerAppender()
{
File = "Foo.log";
AppendToFile = false;
RollingStyle = RollingMode.Once;
LockingModel = new MinimalLock();
Name = "SomeAppender";
Layout = new PatternLayout { ConversionPattern = "%m" };
#you can get scrum cards for specific issues
jira-cards issues --keys "foo-1, foo-4, foo-10" --output c:\temp\test.pdf
#you can also specify ranges (a la ruby ranges) of keys e.g.
jira-cards issues --keys foo-4..foo-10 --output c:\temp\test.pdf
#or you could go crazy and have both!