Skip to content

Instantly share code, notes, and snippets.

View bryanmikaelian's full-sized avatar

Bryan Mikaelian bryanmikaelian

View GitHub Profile
@bryanmikaelian
bryanmikaelian / VerifyCSS.cs
Created January 18, 2011 17:23
Short snippet on how to verify CSS styling on an element.
selenium.VerifyElementPresent("css=..."); // Specify your CSS selector here. If you are looking for a particular CSS style, the element would be present because it would have the CSS style.
@bryanmikaelian
bryanmikaelian / GetAllSelectors.js
Created January 18, 2011 21:27
This will get all elements based on a given CSS selector. You can use this to with the WaitForCondition, etc.
selenium.browserbot.document.querySelector('foo.bar')
@bryanmikaelian
bryanmikaelian / Practice.m
Created May 17, 2011 19:19
Center UIActivityIndicatorView when UITabBar present
UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
activityIndicator.center = CGPointMake(160, 191); // Subtract 49 pixels for the height if you have a tab bar
@bryanmikaelian
bryanmikaelian / programmerTest.cs
Created June 17, 2011 13:40
OO Programmer test (C#)
using System;
namespace Programmer {
public class Skillz {
public static void Main() {
Console.WriteLine("Round 1. CODE!");
Console.WriteLine("--------------\n");
@bryanmikaelian
bryanmikaelian / cheese.rb
Created June 20, 2011 15:55
Simple Polymorphism - Now with more cheese
class Cheese
attr_reader :name
def initialize
@name = "cheese"
end
def eat_cheese(cheese)
puts "This " + cheese.name + " is great!"
end
@bryanmikaelian
bryanmikaelian / example.rb
Created July 28, 2011 21:44
example ruby for a friend
class Hello
def say_hello
puts "Hello world"
end
end
hello_class = Hello.new
hello_class.say_hello
@bryanmikaelian
bryanmikaelian / Test.cs
Created August 18, 2011 15:35
example for Matthew S.
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Data;
using System.Data.SqlClient;
@bryanmikaelian
bryanmikaelian / simple.rb
Created November 14, 2011 23:09
Simple ruby example
class Puppy
def bark
puts 'Woof'
end
def wag_tail
unless self.sad?
puts '<wags tail>'
end
end
@bryanmikaelian
bryanmikaelian / pyro.cs
Created November 17, 2011 15:48
Pyro - Helping a friend out
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Example {
public class Pyro {
// Some property
bool isAwesome;
@bryanmikaelian
bryanmikaelian / contribution.cs
Created January 5, 2012 21:05
Example for David
var contributionData = new List<dynamic> {
new Contribution { FundOrPledgeDrive = "Auto Test Fund", SubFund = null, Amount = "2204" },
new Contribution { FundOrPledgeDrive = "Auto Test Fund", SubFund = null, Amount = "2208" }
};