Skip to content

Instantly share code, notes, and snippets.

View anthonybrown's full-sized avatar
🎯
Focusing

Tony Brown anthonybrown

🎯
Focusing
View GitHub Profile
<!doctype html>
<html>
<head>
<title>Web Workers</title>
</head>
<body>
<script id="worker" type="app/worker">
addEventListener('message', function() {
postMessage('What up, sucka.');
full_width = 80
columns = 12
gutter = 1
.container
width unit(full_width, '%')
margin auto
overflow hidden
div[class^="grid_"]
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@benjchristensen
benjchristensen / CallbackB.java
Last active January 16, 2024 15:09
CallbackB.java Example of using Callbacks for nested calls showing the incidental complexity that results and how eventually the asynchronous paths need to be synchronized together.
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
public class CallbackB {
/**
@anthonybrown
anthonybrown / app.js
Created April 15, 2013 01:25 — forked from nrstott/app.js
var bogart = require('bogart');
var Q = require('promised-io/lib/promise');
var mongoose = require('mongoose');
var PostSchema = new mongoose.Schema({
title: String,
body: String,
comments: [ CommentSchema ]
});
@jimothyGator
jimothyGator / README.md
Last active April 25, 2024 18:00
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@glueckpress
glueckpress / px-rem-cheat-sheet.css
Created May 26, 2013 16:17
Cheat sheet for rem-calculations based upon 14px and 16px.
/*! = $rembase: 14px
--------------------------------------------------------------
* hmtl { font-size: 87.5%; }
* body { font-size: 14px; font-size: 1rem; line-height: 1; }
* 4px 0.28571429rem
* 8px 0.571428571rem
* 12px 0.857142857rem
* 13px 0.928571429rem
* 14px 1rem
* 16px 1.142857143rem
@anthonybrown
anthonybrown / basic express site
Created July 31, 2013 18:28
basic node server script
// This is your typical Express app.
// We have already worked with something like this
var express = require('express')
, path = require('path');
var app = express();
app.configure( function () {
'use strict';
app.set('view engine', 'jade');
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet