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
module.exports = [ | |
"ab", | |
"aa", | |
"af", | |
"ak", | |
"sq", | |
"am", | |
"ar", | |
"an", | |
"hy", |
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
log = (input) -> | |
Math.log(input) / Math.log(26) | |
getColName = (input) -> | |
temp = input | |
char = '' | |
result = '' | |
# temp -= temp / temp^power | |
# console.log power |
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
// watch - translate - assign other member of scope | |
// check out how it works at http://jsfiddle.net/SWe4r/1/ | |
var app = angular.module('watcherApp', []); | |
app.controller('watcherController', function ($scope) { | |
$scope.source = 'aaaaaa'; | |
$scope.foo = { | |
bar: 'aaa' | |
}; | |
$scope.bar = { |
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
# case 1 | |
module.exports = function (options) { | |
options.blah; | |
} | |
# case2 | |
module.exports = function () { | |
var options = require('../config.js'); | |
options.blah | |
} |
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
{ | |
"aar": | |
{ | |
"int":["Afar"], | |
"native":["Afaraf"] | |
}, | |
"aa": | |
{ | |
"int":["Afar"], | |
"native":["Afaraf"] |
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
# hashids (https://www.npmjs.org/package/hashids) make to support encrypt/decrypt string, json. | |
hashIds = new Hashids(secret); | |
hashIds.encryptString = (str) -> | |
hashIds.encrypt([].slice.call(new Buffer(str))); | |
hashIds.decryptString = (encrypted) -> | |
new Buffer(hashIds.decrypt(encrypted)).toString() | |
hashIds.encryptJSON = (obj) -> | |
hashIds.encrypt([].slice.call(new Buffer(JSON.stringify(obj)))); |
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
event-tracking.com|4webmasters.org|trafficmonetize.org|semalt.semalt.com|social-buttons.com|best-seo-offer.com|buttons-for-website.com|free-share-buttons.com|buttons-for-your-website.com |
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
/*cordova-deviceready-$q*/ | |
'use strict'; | |
angular.module('elcoCordova', []) | |
.factory('elcoCordova.onDeviceReady', [ | |
'$q', | |
'$log', | |
function ($q, console) { | |
console.log('elcoCordova.onDeviceReady'); | |
var deferred = $q.defer(); |
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
require 'yaml' | |
def active_record_2_yaml(active_record) | |
hash = Array.wrap(active_record).as_json.reduce({}) {|memo, item| | |
memo["id_#{item['id']}"] = item | |
memo | |
} | |
hash.to_yaml | |
end |