This is now an actual repo:
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
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
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
/*! | |
* Fluent Table Cells - An easily extendible fluent interface for programmatically creating table cells in JavaScript. | |
* Author: Randy Burden | |
* http://www.randyburden.com | |
* Open Source Url: https://gist.github.com/2629702 | |
* | |
* Example usage: | |
var row = '<tr>'; |
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
def highlight(element): | |
"""Highlights (blinks) a Webdriver element. | |
In pure javascript, as suggested by https://github.com/alp82. | |
""" | |
driver = element._parent | |
driver.execute_script(""" | |
element = arguments[0]; | |
original_style = element.getAttribute('style'); | |
element.setAttribute('style', original_style + "; background: yellow; border: 2px solid red;"); | |
setTimeout(function(){ |
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
public IQueryable<T> FindBy(Expression<Func<T, bool>> predicate, params Expression<Func<T, object>>[] includes) | |
{ | |
var query = GetAll().Where(predicate); | |
return includes.Aggregate(query, (current, includeProperty) => current.Include(includeProperty)); | |
} | |
// Sample usage | |
userRepository.FindBy(x => x.Username == username, x.Roles) |
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
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using NHibernate; | |
using NHibernate.Cfg; | |
/// <summary> | |
/// NHibernate Helper | |
/// </summary> | |
/// <remarks> | |
/// Because the SessionFactory creation is lazy-loaded, you technically never need to bootstrap NHibernate |
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
[ | |
{ | |
"event": "send", | |
"msg": { | |
"ts": 1365109999, | |
"subject": "This an example webhook message", | |
"email": "[email protected]", | |
"sender": "[email protected]", | |
"tags": [ | |
"webhook-example" |
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
// Convert the DOM element to a drawing using kendo.drawing.drawDOM | |
kendo.drawing.drawDOM($(".qr-wrapper")) //#qrMail | |
.then(function(group) { | |
// Render the result as a PNG image | |
return kendo.drawing.exportImage(group); | |
}) | |
.done(function(data) { | |
// Save the image file | |
kendo.saveAs({ | |
dataURI: data, |
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
SELECT LOWER(REPLACE(NEWID(),'-','')) |
OlderNewer