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
### My Environment | |
- [ ] Windows 7 or below (not truly supported due to EOL) | |
- [ ] Windows 8 | |
- [ ] Windows 8.1 | |
- [ ] Windows 10 | |
- [ ] Windows 10 IoT Core | |
- [ ] Windows Server 2012 | |
- [ ] Windows Server 2012 R2 | |
- [ ] Windows Server 2016 |
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 wrappers = require("pouchdb-wrappers"); | |
var noops = {}; | |
// also add all the other methods | |
"get allDocs getAttachment info revsDiff put post".split(" ")).forEach(function (name) { | |
noops[name] = function (orig) {return orig(); }; | |
}); | |
wrappers.installWrapperMethods(db, noops); |
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
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl |
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
_.mixin({ | |
'inherit': function(child, base, props) { | |
child.prototype = _.create(base.prototype, _.assign({ | |
'_super': base.prototype, | |
'constructor': child | |
}, props)); | |
return child; | |
} | |
}); |
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
'use strict'; | |
// var fast = require('fast.js'); | |
var Benchmark = require('benchmark'); | |
function generateString(length) { | |
var text = ""; | |
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789#$%^&*()-_+=!@~<>?/.,[]}{\|}"; | |
for (var i = 0; i < length; i++) { |
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
#!/bin/bash | |
open -j -a 'Microsoft Lync' | |
open -j -a 'Slack' | |
open -j -a 'Skype' | |
open -k -a 'Microsoft Outlook' | |
open -j -a 'Quip' |
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
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
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
// in the regex, the carrot(^) negates the match, so if the stringToReplace contains something that is not a-z or 0-9 it will be replaced | |
// In this case the desired string will only be alpha numeric characters, stripping out spaces and symbols | |
// Help from: http://stackoverflow.com/questions/4374822/javascript-regexp-remove-all-special-characters | |
var desired = stringToReplace.replace(/[^a-zA-Z0-9]/gi, '') |
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
function doHash(str, seed) { | |
var m = 0x5bd1e995; | |
var r = 24; | |
var h = seed ^ str.length; | |
var length = str.length; | |
var currentIndex = 0; | |
while (length >= 4) { | |
var k = UInt32(str, currentIndex); | |