Skip to content

Instantly share code, notes, and snippets.

David Trejo DTrejo

Block or report user

Report or block DTrejo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
DTrejo /
Last active Aug 29, 2015
Use the lobotomized owl selector in conjunction with margin auto and max-width for easy responsive single column sites. Inspired by
View gist:e257a45de4cdd9bb3598
require 'sinatra'
require 'infusionsoft'
require 'logger'
Infusionsoft.configure do |config|
config.api_url = ''
config.api_key = 'XXXXXXXXXXXXXXX'
config.api_logger ="./infusionsoft_api.log")
View nginx-settings
# wordpress over fastcgi
server {
listen 81;
server_name _;
root /mnt/apps/airpair-blog/current;
index index.html index.php /index.php;
# restricting all dot files
location ~ /\. { return 403; }
DTrejo / find-console.log.js
Created Apr 7, 2013
find rogue console.log that snuck into your code, or other people's code
View find-console.log.js
var cl = console.log
console.log = function() {
cl.apply(console, arguments)
// then grep through your code for that function.
# Favicon and Apple Touch Icon Generator
# This bash script takes an image as a parameter, and uses ImageMagick to convert it to several
# other formats used on modern websites. The following copies are generated:
# * apple-touch-icon-114x114-precomposed.png
# * apple-touch-icon-57x57-precomposed.png
# * apple-touch-icon-72x72-precomposed.png
View gist:5114888


Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA
View test.redis-multi.js
var redis = require('redis')
, client = redis.createClient()
, assert = require('assert');
// redis.debug_mode = true;
client.on("error", function (err) {
console.log("Error " + err);
DTrejo / fat.json
Created May 9, 2012
biggest fatest example json you will ever see? maybe, but check out
View fat.json
"name": "my-big-json-package-example"
, "description": "see `npm help json` for full docs. Thanks for reading! — @ddtrejo"
, "keywords": [ "keywords", "to help people find", "this package" ]
, "homepage": ""
, "bugs": {
"//": "(either hash is optional)"
, "url" : ""
, "email" : ""
View exec_usage.js
var redis = require("../index");
var async = require("async");
// Set this to truthy to see the wire protocol and other debugging info
redis.debug_mode = process.argv[2];
client1 = redis.createClient();
client2 = redis.createClient();
multi1 = client1.multi();
DTrejo / proposal.js
Created Apr 9, 2012
API thoughts for zookeeper mkdir -p
View proposal.js
// How would you prefer to use a mkdir-p API?
// Note that this is for making directories in ZooKeeper :)
// Option #1
var mkdirp = require('zk-mkdirp');
You can’t perform that action at this time.