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
# List all installed Apple Developer certificates | |
security find-certificate -a -c "Developer" login.keychain | grep '"labl"' | cut -d'"' -f4 | |
# List installed .mobileprovision files | |
ls ~/Library/MobileDevice/Provisioning\ Profiles/ | |
# Get plist from a .mobileprovision file | |
openssl smime -inform der -verify -noverify -in $mobileprovision_file |
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
module.exports = function (Handlebars) { | |
/*! ****************************** | |
Handlebars helpers | |
*******************************/ | |
// debug helper | |
// usage: {{debug}} or {{debug someValue}} | |
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/) | |
Handlebars.registerHelper("debug", function(optionalValue) { | |
console.log("Current Context"); |
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
var hbs = require('express-hbs'), | |
api = require('core/server/api'), | |
_ = require('lodash'), | |
async = require('express-hbs/lib/async'), // To redefine `registerAsyncHelper` | |
registerAsyncHelper; | |
// Redefine `registerAsyncHelper` from `express-hbs` | |
registerAsyncHelper = function (name, fn) { | |
hbs.handlebars.registerHelper(name, function (context, options) { | |
// Pass `[context, options]` as arg instead of `context` only |
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
// Basic usage | |
mongo2sql({ 'a': 'b', 'c': 'd' }); | |
"[a] = 'b' AND [c] = 'd'" | |
mongo2sql({ 'a': { $gt: 123 }, 'c': 'd' }); | |
"[a] > 123 AND [c] = 'd'" | |
mongo2sql({ $or: [{ 'a': 'b'}, { 'c': 'd' }] }); | |
"( ( [a] = 'b' ) OR ( [c] = 'd' ) )" |
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
(function(doc) { | |
var head = doc.documentElement, | |
isHeadReady, | |
isDomReady, | |
domWaiters = [], | |
queue = [], // waiters for the "head ready" event | |
handlers = {}, // user functions waiting for events | |
scripts = {}, // loadable scripts in different states | |
isAsync = doc.createElement("script").async === true || "MozAppearance" in doc.documentElement.style || window.opera; |
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
/* WysiHat - WYSIWYG JavaScript framework, version 0.2.1 | |
* (c) 2008-2010 Joshua Peek | |
* | |
* WysiHat is freely distributable under the terms of an MIT-style license. | |
*--------------------------------------------------------------------------*/ | |
(function (window) { | |
var WysiHat = {}; |
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
/* Prototype JavaScript framework, version 1.6.1 | |
* (c) 2005-2009 Sam Stephenson | |
* | |
* Prototype is freely distributable under the terms of an MIT-style license. | |
* For details, see the Prototype web site: http://www.prototypejs.org/ | |
* | |
*--------------------------------------------------------------------------*/ | |
window.Prototype = { | |
Version: '1.6.1', |
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
exports.parse = function (string, format) { | |
var match = string.match(/^(\+|-)\s*(\d+)\s*([a-z]{3})/i); | |
var add; | |
if (!match) { | |
add = 0; | |
} else { | |
add = parseInt(match[2], 10); | |
switch (match[3]) { | |
case 'min': | |
add *= 60; |
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
exports.Base64 = { | |
'_keyStr': "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
'encode': function (input) { | |
var output = ''; | |
var chr1, chr2, chr3, enc1, enc2, enc3, enc4; | |
var i = 0; | |
input = this._utf8_encode(input); | |
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
var rsplit = function (string, regex) { | |
var result = regex.exec(string), | |
retArr = [], | |
first_idx, | |
last_idx, | |
first_bit; | |
while (result !== null) { | |
first_idx = result.index; | |
last_idx = regex.lastIndex; | |
if (first_idx !== 0) { |
OlderNewer