Opinions are like assholes, every one has got one.
This one is mine.
Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.
| var | |
| PARALLEL_CONNECTS = 10, | |
| http = require('http'), | |
| sys = require('sys'), | |
| connectionCount = 0, | |
| messageCount = 0; | |
| lastMessages = 0; | |
| function addClient() { |
| [unix_http_server] | |
| file=/tmp/supervisor.sock ; path to your socket file | |
| [supervisord] | |
| logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
| logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
| logfile_backups=10 ; number of backed up logfiles | |
| loglevel=error ; info, debug, warn, trace | |
| pidfile=/var/run/supervisord.pid ; pidfile location | |
| nodaemon=false ; run supervisord as a daemon |
| from django.db import models | |
| class Person(models.Model): | |
| name = models.CharField(max_length=200) | |
| groups = models.ManyToManyField('Group', through='GroupMember', related_name='people') | |
| class Meta: | |
| ordering = ['name'] | |
| def __unicode__(self): |
| class WordIndexCipher | |
| attr_accessor :source_text, :character_table | |
| def initialize(text) | |
| @source_text = text.upcase.split(' ') | |
| make_character_table | |
| end | |
| def encode(text) | |
| @cipher = "" |
| #! /usr/bin/env python | |
| import redis | |
| import random | |
| import pylibmc | |
| import sys | |
| r = redis.Redis(host = 'localhost', port = 6389) | |
| mc = pylibmc.Client(['localhost:11222']) |
| var cluster = require('cluster'), | |
| app = require('./app'); | |
| var workers = {}, | |
| count = require('os').cpus().length; | |
| function spawn(){ | |
| var worker = cluster.fork(); | |
| workers[worker.pid] = worker; | |
| return worker; |
| Create an account on heroku | |
| Download your app from itp.nyu.edu | |
| Cleanup config.ru | |
| put everything in public | |
| Install the heroku gem | |
| - launch Terminal | |
| - install heroku gem: | |
| sudo gem install heroku | |
| (type your computer's password) |
| /** | |
| * An implementation for Mergesort. Less efficient | |
| * than Quicksort. Again, you'd just use Array.sort | |
| * but if you found yourself unable to use that | |
| * there's always this option. | |
| * | |
| * Tests with: | |
| * | |
| * var array = []; | |
| * for(var i = 0; i < 20; i++) { |
| # the admin password for all of the IE VMs is “Password1″ without the quotes, it's also used for the password hints | |
| 1) Install VirtuaBox on your mac | |
| http://download.virtualbox.org/virtualbox/4.1.10/VirtualBox-4.1.10-76795-OSX.dmg | |
| 2) Decide which versions of Internet Explorer you want to download and install – each version of Internet Explorer is contained within a separate virtual machine that runs within VirtualBox. In other words, if you want to run Internet Explorer 7, 8, and 9, you will need to download three separate VM’s, which may take a while so keep that in mind. Select the text below and copy it: | |
| # Install ALL versions of Internet Explorer: IE 7, IE 8, and IE 9 (for now this script will also pull down a IE 6 vm with windows xp) |