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
# v0.0.1 Codename Renzo | |
from random import randint | |
import sys | |
import os | |
def say_dyslexic(msgs): | |
for msg in msgs: os.system("say -r " + str(randint(0, 300)) + " " + msg) | |
def intro(): | |
for i in range(5): say_dyslexic(["o", "renzoo"]) |
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
'use strict'; | |
module.exports = function(roman) { | |
var roman_array = roman.split(''); | |
var dec_array = roman_array.map(function(roman_alg) { | |
return ROMAN_MAP[roman_alg]; | |
}); | |
var same = 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
'use strict'; | |
module.exports = function toUnderscore(s) { | |
return (s.charAt(0) + s.slice(1).replace(/[A-Z]/g, '-$&')).toLowerCase() | |
} |
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 mongoose = require('mongoose'); | |
var native = mongoose.Document.prototype.toObject; | |
module.exports = function(schema/* options [could make it safer :)]*/) { | |
schema.methods.toObject = function() { | |
var _this = this; | |
var obj = mongoose.Document.prototype.toObject.apply(this, arguments); | |
var extraneous = Object.keys(this).filter(function(key) { |
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
'use strict'; | |
var escapedCharsRegExp = /([.?*+^$[\]\\(){}|-])/g; | |
function escapeRegExp(str) { | |
return str && str.replace && str.replace(escapedCharsRegExp, '\\$1'); | |
} | |
function safeRegExp(str) { | |
return new RegExp(escapeRegExp(str)); | |
} |
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 Promise = require('bluebird'); | |
_ = require('lodash'); | |
/** | |
* Map an object, or a promise of an object, with the given `mapper` function | |
* with the signature `(value, key, obj)` where `value` is an object's `key` | |
* property's value. | |
* | |
* If the `mapper` function returns promises or thenables, the returned promise | |
* will wait for all the mapped results to be resolved as well. |
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 a_id(){r='';s=arguments[0];for($=++[[]][+[]]-1;$<s.length*(++[[]][+[]]);$+=++[[]][+[]])r+=s[$];return r.split('');} |
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
'use strict'; | |
var mongoose = require('mongoose'), | |
Promise = require('bluebird'); | |
mongoose.connect('mongodb://localhost/test'); | |
var SomethingSchema = new mongoose.Schema({ | |
name: String | |
}); |
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
/** | |
* Sets a selector to a variable. | |
* | |
* @example | |
* | |
* font-size-h1 = 10px | |
* from-variable(h1, font-size) | |
* | |
* would yield: | |
* |
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
vnoremap <leader><leader>; :Tabularize/:\zs/l1r0 |
OlderNewer