Skip to content

Instantly share code, notes, and snippets.

@jondot
jondot / app.coffee
Created August 23, 2011 09:57
image-gallery
class Thumb extends Backbone.Model
defaults:
uri: ''
state: ''
select: (state) ->
st = ''
st = 'selected' if state
@set('state' : st)
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# https://answers.launchpad.net/graphite/+question/152851
####################################
sudo apt-get update
sudo apt-get upgrade
wget http://launchpad.net/graphite/1.0/0.9.8/+download/graphite-web-0.9.8.tar.gz
@jondot
jondot / carbon
Created September 13, 2011 12:32
inits
#! /bin/sh
# /etc/init.d/carbon
# see http://tompurl.com/2011/08/12/installing-graphite-on-ubuntu-10-4-lts/
# Some things that run always
touch /var/lock/carbon
GRAPHITE_HOME=/opt/graphite
CARBON_USER=www-data
@jondot
jondot / initial_data.json
Created September 13, 2011 13:50
graphite admin:admin defaults
[
{
"pk": 1,
"model": "auth.user",
"fields": {
"username": "admin",
"first_name": "",
"last_name": "",
"is_active": true,
"is_superuser": true,
@jondot
jondot / dashboard.conf
Created September 13, 2011 15:43
grahpite-web sample dashboard conf that works with example-client.py
# This configuration file controls the behavior of the Dashboard UI, available
# at http://my-graphite-server/dashboard/.
#
# This file must contain a [ui] section that defines the following settings:
#
[ui]
default_graph_width = 400
default_graph_height = 250
automatic_variants = true
refresh_interval = 60
@jondot
jondot / local.js
Created September 18, 2011 15:37
statsd localhost config
{
debug:true,
graphitePort: 2003,
graphiteHost: "localhost",
port: 8125
}
@jondot
jondot / gist:1274080
Created October 9, 2011 20:03
multi rack test with minitest/spec
class MiniTest::Spec
include Rack::Test::Methods
def set_app(app)
@app = app
end
def app
@app
end
@jondot
jondot / README.markdown
Created October 26, 2011 10:23 — forked from marijn/README.markdown
List of countries in YAML, CSV and TXT format

#List of countries

It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.

List of nationalities

I've also compiled a list of nationalities

@jondot
jondot / langs.yml
Created October 27, 2011 08:27
yaml of languages
---
ab:
name: Abkhaz
nativeName: "\xD0\xB0\xD2\xA7\xD1\x81\xD1\x83\xD0\xB0"
aa:
name: Afar
nativeName: Afaraf
af:
name: Afrikaans
nativeName: Afrikaans
connect = require 'connect'
s = connect.createServer(connect.logger())
s.listen(4000)
null_resp = (req, res )->
res.end("")
s.use '/', null_resp