Skip to content

Instantly share code, notes, and snippets.

View apg's full-sized avatar
🐢
Turtle

Andrew Gwozdziewycz apg

🐢
Turtle
View GitHub Profile
@apg
apg / dart.txt
Created September 18, 2011 03:30 — forked from paulmillr/dart.md
Google dart email
---------- Forwarded message ----------
From: Mark S. Miller <[email protected]>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: [email protected]
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
@apg
apg / statsd.diff
Created September 8, 2011 20:33
statsd multiple flushers... on top of other unreleased stuff...
* statsd_domload_20120: multiple flush intervals a la graphite itself
---
diff --git a/util/conf/production/statsd-config.js b/util/conf/production/statsd-config.js
index d855abe..197736a 100644
--- a/util/conf/production/statsd-config.js
+++ b/util/conf/production/statsd-config.js
@@ -4,5 +4,16 @@
, port: 8125
, statusPort: 8126
@apg
apg / qm.scm
Created September 8, 2011 12:46
(define (match pat thing)
(cond
((null? pat) 'yes)
((null? thing) 'no)
((eq? (car pat) '*) (match (cdr pat) (cdr thing)))
((eq? (car pat) '**) (match (cdr pat) (cdr thing)))
((eq? (car pat) (car thing)) (match (cdr pat) (cdr thing)))
(else 'no)))
(match '(* y z) '(z y z))
#!/usr/bin/env python
"""This script goes through a bunch of code and determines whether
or not there is the potential for a problem because we're using
an assignment directly rather than a setter. It's pretty specific
to the Meetup entities framework.
"""
from __future__ import with_statement
@apg
apg / project-mode.el
Created September 1, 2011 03:33
A gist of project-mode.el
;;; project-mode.el
;;
;; Author: Benjamin Cluff
;; Created: 02-Feb-2010
;;
;; Synopsis:
;; * Finding files is greatly simplified (see key bindings)
;; * TAGS files for project files.
;;
#!/usr/bin/env python
"""This script spits out a log in a simulated real-time based on
information provided at the command line.
"""
import datetime
import optparse
import re
import time
import sys
package com.meetup.base.util;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
public class Permutations<T> implements Iterator<List<T>> {
private ArrayList<T> _source;
private int[] _state;
flipdict = lambda d: dict((v, k) for k, v in d.items())
@apg
apg / ded.clj
Created August 24, 2011 12:19 — forked from alandipert/ded.clj
Command-line structural data editing
(ns ded
"Structural Data EDitor for Clojure with zippers. Inspired by Interlisp: http://larry.masinter.net/interlisp-ieee.pdf"
(:require [clojure.zip :as z])
(:use [clojure.pprint :only (with-pprint-dispatch code-dispatch pprint)]
[clojure.repl :only (source-fn)]))
(defn print-hr
"Prints 30 dashes and a newline."
[c]
(println (apply str (repeat 30 c))))
@apg
apg / gist:1163722
Created August 22, 2011 21:55 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Software Engineer at Meetup
Favorite Python project: nyanbar (https://github.com/apgwoz/nyanbar)
Favorite Conference: I don't go to many conferences. Clojure Conj was great last year.
Python Experience Level: Experty