This file contains hidden or 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
Show hidden characters
{ | |
"remember_open_files": false, | |
"hot_exit": false | |
} |
This file contains hidden or 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
lib-cov | |
*.seed | |
*.log | |
*.csv | |
*.dat | |
*.out | |
*.pid | |
*.gz | |
*.tmp | |
*.db |
This file contains hidden or 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
var Sequelize = require('sequelize'); | |
module.exports = function(config) { | |
var models = {}; | |
sequelize = new Sequelize(config.database, config.username, config.password, config.options); | |
// Bootstrap models | |
fs.readdirSync(__dirname).forEach(function (file) { |
This file contains hidden or 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
/** | |
* Determine if this browser supports emoji. | |
* | |
* Modified from https://gist.github.com/mwunsch/4710561 | |
* and probobly originally github's javascript source | |
*/ | |
function doesSupportEmoji() { | |
var context, smiley; | |
if (!document.createElement('canvas').getContext) return; | |
context = document.createElement('canvas').getContext('2d'); |
This file contains hidden or 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
NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:@"camera"]; | |
[string setAttributes:@{(NSString *)kCTLigatureAttributeName:[NSNumber numberWithInt:2]} range:NSMakeRange(0, string.length)]; | |
self.myUILabel.attributedText = string; |
This file contains hidden or 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
for (NSString *familyName in [UIFont familyNames]) { | |
for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) { | |
NSLog(@"%@ - %@", familyName, fontName); | |
} | |
} |
This file contains hidden or 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
/* | |
* Gets the starting index of the selected text | |
*/ | |
function _getSelectionHtml() { | |
/* | |
* Returns HTML String of current selection | |
*/ | |
var html = ""; |
This file contains hidden or 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
// Get the connection uri and set it up for processing | |
var uri = process.env.MONGOLAB_URI; | |
var uri = uri.slice(uri.indexOf('/')+1); | |
var user = uri.substring(1, uri.indexOf(':')); | |
var pass = uri.substring(uri.indexOf(':')+1, uri.indexOf("@")); | |
var dbName = uri.substring(uri.lastIndexOf("/")+1); | |
var port = uri.substring(uri.lastIndexOf(":") + 1, uri.lastIndexOf("/")); | |
var host = uri.substring(uri.lastIndexOf("@") + 1, uri.lastIndexOf(":")); |
NewerOlder