Skip to content

Instantly share code, notes, and snippets.

View deanhume's full-sized avatar
🎮
Gaming

Dean deanhume

🎮
Gaming
View GitHub Profile
@deanhume
deanhume / IndexCompleted.cs
Created January 16, 2012 13:45
Async Controller - IndexCompleted()
public ActionResult IndexCompleted(string data, string moredata)
{
Operations translations = new Operations {FirstOperation = data, SecondOperation = moredata};
return View(translations);
}
@deanhume
deanhume / blogtinycon.js
Created February 9, 2012 10:22
Blog TinyCon
<input type="hidden" id="blogCount" name="blogCount" value="<%= TempData["TotalPageCount"] %>" />
<script type="text/javascript">
// Check if user can handle localStorage first.
if (typeof (localStorage) != 'undefined') {
GetCount();
}
function GetCount() {
// Get the last value
var blogCount = localStorage.getItem('blogCount');
@deanhume
deanhume / tinyConExample.html
Created February 9, 2012 10:35
TinyCon Starter Example
<html>
<head>
<link rel="icon" href="favicon.ico">
<title>Tinycon</title>
<script src="../tinycon.js"></script>
<script>
(function(){
var count = 0;
setInterval(function(){
@deanhume
deanhume / bindings.config
Created March 16, 2012 10:58
SimpleBrowser Bindings
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="WebDriver" publicKeyToken="1c2bd1631853048f" culture="neutral" />
<bindingRedirect oldVersion="2.13.0.0" newVersion="2.16.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
@deanhume
deanhume / SimpleBrowser.cs
Created March 16, 2012 11:03
SimpleBrowser Example
[Test]
public void SearchResults_ShouldHaveCorrectPageTitle()
{
_driver = new SimpleBrowserDriver();
// Navigate
_driver.Navigate().GoToUrl("http://www.deanhume.com");
// Enter search value
IWebElement searchBox = _driver.FindElement(By.Name("searchValue"));
@deanhume
deanhume / SimpleSelenium.cs
Created April 25, 2012 09:57
Simple Selenium Example
namespace SeleniumTest
{
[TestFixture]
public class BlogTest
{
}
}
@deanhume
deanhume / SeleniumMultipleBrowsers.cs
Created April 25, 2012 10:01
Selenium Multiple Browsers
namespace SeleniumTest
{
[TestFixture(typeof(FirefoxDriver))]
[TestFixture(typeof(InternetExplorerDriver))]
public class BlogTest<TWebDriver> where TWebDriver : IWebDriver, new()
{
private IWebDriver _driver;
[Test]
public void SearchResults_ShouldHaveCorrectPageTitle()
@deanhume
deanhume / manifest.json
Created May 15, 2012 18:13
manifest.json
{
"name": "Blog Feed Reader",
"version": "1.0",
"description": "This is a simple feed reader that will display the top 5 posts from deanhume.com",
"icons": { "128": "icon128.png" },
"browser_action": {
"default_title": "Blog Feed Reader",
"default_icon": "icon128.png",
"default_popup": "feed.html"
},
@deanhume
deanhume / feed.html
Created May 15, 2012 18:25
Feedburner
<!DOCTYPE html>
<html>
<head></head>
<body>
<h1>A simple blog feed reader</h1>
<!-- The script goes here -->
<script src="http://feeds.feedburner.com/DeanHumesBlog?format=sigpro" type="text/javascript" >
</script>
@deanhume
deanhume / feedburnerUpdated.html
Created May 21, 2012 08:24
Feedburner Updated
<!DOCTYPE html>
<html>
<head>
<title>A simple blog feed reader</title>
<style type="text/css">
html
{
width: 400px;
}
a:link, a:hover, a:active