Skip to content

Instantly share code, notes, and snippets.

@spartanp
spartanp / Selenium2Example.java
Created June 13, 2011 22:45
automate ctct subscription
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Selenium2Example {
public static void main(String[] args) {
for (int i = 0; i < 3; i++) {
// Create a new instance of the Firefox driver
@spartanp
spartanp / gist:996266
Created May 27, 2011 21:55
curl yui dependecies
<?php
include("../../phploader/phploader/loader.php");
$loader = new YAHOO_util_Loader("3.3.0");
$loader->combine = true;
$loader->filter = YUI_RAW;
$loader->load("yui",
"node",
"overlay",
@spartanp
spartanp / gist:938022
Created April 23, 2011 00:28
set() vs setAttribute()
<h2> tests using setAttribute() method </h2>
<div>
<input id="p" value="setAttribute() Test">
<button id="csa"> Clear value using setAttribute() method </button>
<button id="sa"> Set the default value back using setAttribute method </button>
</div>
<h2> tests using set() method </h2>
<div>
<input id="pv" value="set() test">
@spartanp
spartanp / gist:938013
Created April 23, 2011 00:24
set() vs setAttribute()
<h2> tests using setAttribute() method </h2>
<div>
<input id="p" value="setAttribute() Test">
<button id="csa"> Clear value using setAttribute() method </button>
<button id="sa"> Set the default value back using setAttribute method </button>
</div>
<h2> tests using set() method </h2>
<div>
<input id="pv" value="set() test">
@spartanp
spartanp / flick.html
Created April 7, 2011 23:02
try out scrollview
<!DOCTYPE html>
<html>
<body>
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui.js" charset="utf-8"></script>
<style>
.cell {
display: inline-block;
width: 150px;
height: 500px;
text-align: center;
@spartanp
spartanp / yui3css
Created November 25, 2010 22:33
reset, base and fonts clubbed
<!-- Minified -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.2.0/build/cssreset/reset-min.css&3.2.0/build/cssfonts/fonts-min.css&3.2.0/build/cssbase/base-min.css">
<!-- Un-minified -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.2.0/build/cssreset/reset.css&3.2.0/build/cssfonts/fonts.css&3.2.0/build/cssbase/base.css">