Skip to content

Instantly share code, notes, and snippets.

View sintaxi's full-sized avatar
🔥
GSD

Brock Whitten sintaxi

🔥
GSD
View GitHub Profile
@sintaxi
sintaxi / gmail.md
Created July 25, 2011 23:40
walkthrough on how to make multiple gmail accounts work together

Gmail Harmony

With the introduction of Google Plus. Managing multiple gmail accounts has become a big pain in the ass. What I have done is consolidated all my email accounts into my main gmail account that I use for G+, analytics, etc. This process expects that you have one main gmail account such as "example@gmail.com" and one or more Google App accounts "henry@example.com". This solution may not work for you but it has helped me a lot.

The end result of this setup is that all your email goes to one inbox but it is

var memLeaker = [
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
@silentrob
silentrob / gist:1371921
Created November 16, 2011 23:57
Simple Node static Server
#!/usr/bin/env node
var express = require("/Users/ironman/.node_libraries/express");
var startPort = 4567;
var app = express.createServer();
app.configure(function(){
app.use(express.static(process.cwd() + '/'));
app.use(express.directory(process.cwd() + '/',{ icons:true }));
@brianleroux
brianleroux / harp-mod-request.md
Created October 12, 2013 20:53
fantasizing about some future integrations. - bringing harp some awareness of smart directories to build concat/min into convention - browserify for harp would be sweet - topcoatify does not yet exist but increasingly we something like it should exist - next www can just 'disappear' as that it becomes a build artifact
|- node_modules/
|- src/
|   |
|   |- index.js/ <----------- uses browserify so anything in node_modules is game for require()
|   |  |- index.js
|   |  '- foo.coffee
|   |
|   |- index.css/ <---------- uses topcoatify so anything in node_modules is game. how import/etc works needs consideration

| | |- index.css

@jorgepedret
jorgepedret / sitemap.xml.jade
Created October 25, 2013 19:02
Recursive function to create dynamic sitemap of your website in Harp using Jade
- var paths = [], files = []; function recursiveTree(obj) { if (typeof obj == "object" && !obj.length) { for (item in obj) { if (item === "contents") { recursiveTree(obj[item]); } else if (item != "data") { paths.push(item); recursiveTree(obj[item]); paths.splice(paths.length-1, 1); } } } else if (typeof obj == "object") { for (i in obj) { var file = obj[i]; if (/(\.html$)/.test(file)) { paths.push(file); files.push("/" + paths.join("/")); paths.splice(paths.length-1, 1); } } } }; recursiveTree(public);
xml
urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
- for(i in files) {
url
loc= files[i]
priority 0.5
- }
@webcss
webcss / databinding.js
Last active April 6, 2016 07:47
Firebase with mithril. Note that the gists provided here are deprecated and will soon be removed. You should use firebaseMixin (https://gist.github.com/webcss/e4aaa7d95342d107e1ce) instead.
var Dinosaurs = {
model: function() {
// return a firebase reference to our database
return new Firebase('https://dinosaur-facts.firebaseio.com');
},
controller: function() {
var ref = Dinosaurs.model();
this.facts = mithrilFire(ref.orderByChild('height'));
},
view: function(ctrl) {
@tj
tj / some.sh
Created October 11, 2012 18:45
change terminal tab name on cd
function tabname {
printf "\e]1;$1\a"
}
if [ x`type -t cd` == "xfunction" ]; then
# previously wrapped cd
eval $(type cd | grep -v 'cd is a function' | sed 's/^cd/original_cd/' | sed 's/^}/;}/' )
else
# builtin
eval "original_cd() { builtin cd \$*; }"
@ammmir
ammmir / gist:1210728
Created September 12, 2011 06:58
Compile GraphicsMagick on Mac OS X 10.7 (Lion)
# download libpng 1.4.x (1.5 didn't work yet with GraphicsMagick 1.3.12)
./configure --prefix=$HOME/INST && make && make install
# download libjpeg
./configure --prefix=$HOME/INST && make && make install
# download GraphicsMagick
CFLAGS=-I$HOME/INST/include LDFLAGS=-L$HOME/INST/lib ./configure --prefix=$HOME/INST --disable-openmp --disable-openmp-slow && make && make install
#!/bin/bash
SERVER=https://api.no.de
SCRIPT="$0"
if [ ${SCRIPT:0:1} == "/" ]; then
SCRIPT="$(basename -- "$SCRIPT")"
fi
main () {
cmd=${1-help}
@isaacs
isaacs / http-example-client.js
Created December 1, 2010 08:35
a simple example of a nodejs http client making a POST request
var http = require("http")
, util = require("sys") // 0.3.x: require("util")
, fs = require("fs")
, client = http.createClient(80, "example.com")
, request = client.request("POST", "/", {"host":"example.com"})
// send body chunks
request.write("hello, world")
// pump a file through