Skip to content

Instantly share code, notes, and snippets.

@font-face {
font-family: 'Meta';
src: url("https://cdn.lever.co/fonts/Meta/metaboldlf-webfont-2017.woff") format('woff');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'Meta';
src: url("https://cdn.lever.co/fonts/Meta/metanormal-webfont-2017.woff") format('woff');
font-weight: 400;
#!/usr/bin/env bash
#
# see: https://gist.github.com/gregorynicholas/2160046ec6946a2ce0fa
# src: https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# updated: 2015-06-06
#
# ask for the administrator password upfront
sudo -v
@distracteddev
distracteddev / example.js
Created November 28, 2012 03:40
example.js
iterator = function(message, callback) {
var userId = message.userId
client.user(userId, function(user) {
callback(null, user);
});
}
async.map(messages, iterator, function(err, mappedMessages) {
// hooray for async map.
});
@distracteddev
distracteddev / results.md
Created November 26, 2012 20:20
test results

TOC

Repo

#db loaded.

db.on('load', function(count) {
@distracteddev
distracteddev / spec.md
Created November 22, 2012 22:14
Seam.io Description

Seam

Seam is the invisible stitching between your Node.js applications and the real world.

What is Seam?

A Personal Deployment Tool for Node.js developers that want to run their applications on a VPS rather than a hosted solution like Nodejitsu or Heroku but still crave the simplicity that comes with having the basic deployment details handled for you. So what problems does Seam.io solve?

  • Deploy Multiple Applications, each with multiple environments (prod, staging, dev, etc)
  • Handles your applications logs in a sane and user friendly way.
  • seam logs from within your app's directory runs a ssh tail -f against the seam server to give you instant access to your logs while integrated 3rd party logging platforms like Loggly, Ratchet.io, etc are also an option for those more demanding situations).
@distracteddev
distracteddev / clicker.js
Created October 29, 2012 00:30
Simulates clicks on web page using jQuery
// @param {string} query # A string in the following format: {element}!{text}
// @param {int} count # Use count to select the Nth element that matches the query
window.click = function click(query, count) {
element = query.split('!')[0];
text = query.split('!')[1];
$(element).each(function(i, el) {
$el = $(el);
var condition = $el.text() === text;
if (count) {
condition = ($el.text() === text && count === i);
@distracteddev
distracteddev / verifyPassword.js
Created September 13, 2012 08:03
Password Validating Function
/*
REGULAR USAGE
verifier.exec('myInvalidPassword') -> returns an [] of error messages
EXTENDED USAGE
verify = function(passwd, options) {
// Some logic
return errors || null;
};
@distracteddev
distracteddev / error
Created August 3, 2012 19:55
npm install error
npm ERR! Error: No compatible version found: read@'>=1.0.0- <1.1.0-'
npm ERR! Valid install targets:
npm ERR! ["0.0.1","0.0.2","0.0.3","0.1.0","0.1.1"]
npm ERR! at installTargetsError (/tmp/node-npm-Dbop/lib/cache.js:488:10)
npm ERR! at next_ (/tmp/node-npm-Dbop/lib/cache.js:438:17)
npm ERR! at next (/tmp/node-npm-Dbop/lib/cache.js:415:44)
npm ERR! at /tmp/node-npm-Dbop/lib/cache.js:408:5
npm ERR! at saved (/tmp/node-npm-Dbop/lib/utils/npm-registry-client/get.js:150:7)
npm ERR! at Object.oncomplete (/tmp/node-npm-Dbop/node_modules/graceful-fs/graceful-fs.js:231:7)
npm ERR! You may report this log at:
@distracteddev
distracteddev / trace.txt
Created July 18, 2012 22:53
jitsu deploy error
soapbox zeus$ jitsu deploy
info: Welcome to Nodejitsu distracteddev
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in node app.js
warn: Local version appears to be old
warn: Your package.json version will be incremented for you automatically
warn: About to write /Users/zeus/projects/soapbox/package.json
warn: Using '*' as version for dependencies may eventually cause issues.
warn: Please use specific versions for dependencies to avoid future problems.
@distracteddev
distracteddev / trace.txt
Created July 18, 2012 22:53
jitsu deploy error
soapbox zeus$ jitsu deploy
info: Welcome to Nodejitsu distracteddev
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in node app.js
warn: Local version appears to be old
warn: Your package.json version will be incremented for you automatically
warn: About to write /Users/zeus/projects/soapbox/package.json
warn: Using '*' as version for dependencies may eventually cause issues.
warn: Please use specific versions for dependencies to avoid future problems.