Skip to content

Instantly share code, notes, and snippets.

View scompt's full-sized avatar
🎓

Edward Dale scompt

🎓
View GitHub Profile
Traceback (most recent call last):
File "/home/edward/buildout/sl.webapi/bin/test", line 20, in <module>
import zope.testrunner
File "/home/edward/.buildout/eggs/zope.testrunner-4.0.0-py2.6.egg/zope/testrunner/__init__.py", line 21, in <module>
import zope.testrunner.interfaces
File "/home/edward/.buildout/eggs/zope.testrunner-4.0.0-py2.6.egg/zope/testrunner/interfaces.py", line 21, in <module>
import zope.interface
ImportError: No module named interface
@scompt
scompt / gist:671002
Created November 10, 2010 15:40
vagrant chef config
# Enable provisioning with chef solo, specifying a cookbooks path (relative
# to this Vagrantfile), and adding some recipes and/or roles.
#
# config.vm.provisioner = :chef_solo
# config.chef.cookbooks_path = "cookbooks"
# config.chef.add_recipe "mysql"
config.chef.add_role "gawker"
#
# You may also specify custom JSON attributes:
# config.chef.json = { :mysql_password => "foo" }
package controllers;
import play.*;
import play.mvc.*;
import java.util.*;
import models.*;
import jobs.*;
public class Application extends Controller {
from PIL import Image
from random import shuffle
from math import log, sqrt
from itertools import permutations
from heapq import heappush, heappop, nlargest
from sys import argv
NUMBER_OF_COLUMNS = 20
def get_pixel_value(im, x, y):
@scompt
scompt / PersistingAsyncEventBus.java
Created May 3, 2012 08:16
An EventBus that persists the most recent event sent.
package com.google.common.eventbus;
import com.google.common.collect.ClassToInstanceMap;
import com.google.common.collect.Multimap;
import com.google.common.collect.MutableClassToInstanceMap;
import roboguice.util.Ln;
import java.util.concurrent.Executor;
/**
public final void onMeasure(final int widthMeasureSpec,
final int heightMeasureSpec) {
int mode = View.MeasureSpec.getMode(widthMeasureSpec);
int width = View.MeasureSpec.getSize(widthMeasureSpec);
int height = (int) (width / aspect.ratio);
int heightSpec = MeasureSpec.makeMeasureSpec(height, mode);
super.onMeasure(widthMeasureSpec, heightSpec);
}
@scompt
scompt / AssertListSizeAction.java
Created August 10, 2012 07:35
Calabash verify list size
package sh.calaba.instrumentationbackend.actions.list;
import android.widget.ListView;
import sh.calaba.instrumentationbackend.InstrumentationBackend;
import sh.calaba.instrumentationbackend.Result;
import sh.calaba.instrumentationbackend.actions.Action;
import java.lang.Integer;
import java.lang.String;
@scompt
scompt / gist:4972292
Last active December 13, 2015 20:48
My opinion of social networks from an email on 3/16/2005
They're so pointless!!!!
There's one that *everybody* at RIT does called thefacebook.com.
Apparently it was written by some guys at Harvard and lots of schools
use it now.
Crap!
I am a third-year Computer Science student at Rochester Institute of Technology seeking a co-op
position that will complement the classes that I am currently taking. I am pursuing a BS and
MS in Computer Science from RIT and would like to concentrate in cryptography and information
security. I believe that my academic interests and my excitement for programming would make me
an ideal employee at the NSA.
@implementation ViewController
- (void) viewDidLoad {
UIGestureRecognizer *recog = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gogo:)];
[self.view addGestureRecognizer:recog];
}
- (void) gogo:(UIGestureRecognizer *)recog {
NSString *clientId = [NSMutableString stringWithString:@"1431665"];
Pinterest *pinterest = [[Pinterest alloc] initWithClientId:clientId];