Skip to content

Instantly share code, notes, and snippets.

View hale's full-sized avatar

Phil Hale hale

View GitHub Profile
@hale
hale / full apt history log
Created May 9, 2012 16:47
apt history log
Start-Date: 2012-04-25 16:04:52
Commandline: apt-get --yes install linux-generic
Install: libnl-3-200:amd64 (3.2.3-2ubuntu2, automatic), wireless-regdb:amd64 (2011.04.28-1ubuntu3, automatic), linux-generic:amd64 (3.2.0.23.25), iw:amd64 (3.2-1, automatic), gettext-base:amd64 (0.18.1.1-5ubuntu3, automatic), libfreetype6:amd64 (2.4.8-1ubuntu2, automatic), grub-pc:amd64 (1.99-21ubuntu3, automatic), libfuse2:amd64 (2.8.6-2ubuntu2, automatic), linux-firmware:amd64 (1.79), libnl-genl-3-200:amd64 (3.2.3-2ubuntu2, automatic), grub-gfxpayload-lists:amd64 (0.6, automatic), crda:amd64 (1.1.2-1ubuntu1, automatic), linux-image-generic:amd64 (3.2.0.23.25), os-prober:amd64 (1.51ubuntu3, automatic), grub-pc-bin:amd64 (1.99-21ubuntu3, automatic), linux-image-3.2.0-23-generic:amd64 (3.2.0-23.36), grub-common:amd64 (1.99-21ubuntu3, automatic), grub2-common:amd64 (1.99-21ubuntu3, automatic)
End-Date: 2012-04-25 16:05:06
Start-Date: 2012-04-25 16:05:40
Commandline: apt-get --yes install minimal^ standard^ ubuntu-desktop^
Insta
@hale
hale / openblight_instructions_ubuntu_12-4.markdown
Created May 31, 2012 13:13
Complete instructions for how to get Code For America's OpenBlight Dashboard working on Ubuntu 12.04 Precise Pangolin (LTS) (64bit)

Installation of OpenBlight Dashboard on Ubuntu 12.04 LTS (64bit)

The install process is rather complicated, so I would recommend scanning through this page first and making sure you understand what's going on.

1) Grab the files.

git clone git://github.com/codeforamerica/openblight.git

2) Install PostGIS.

@hale
hale / openblight_instructions_os_x_10-6.markdown
Created June 7, 2012 00:13
Complete instructions for how to get Code For America's OpenBlight Dashboard working on Mac OS X 10.6 Snow Leopard

Installation of OpenBlight Dashboard on Mac OS X 10.6 Snow Leopard

The install process is rather complicated, so I would recommend scanning through this page first and making sure you understand what's going on.

1) Grab the files.

git clone git://github.com/codeforamerica/openblight.git

2) Install PostgreSQL and PostGIS.

@hale
hale / cfa_gsoc_2012_log.markdown
Created June 26, 2012 17:35
GSoC 2012: Code for America. Weekly Log.

Week 1 report

The first week was mostly administrative, but the week starting Monday June 11 was when the program started for real. I met the 'fellows' at Code for America and we were sorted into different teams of our choosing, to work on various projects which CfA are currently supporting. I was teamed up with one other GSoC intern and two fellows to work on Honolulu Answers, a search portal for government services in Honolulu (much like the new www.gov.uk)

Events

  • Informal discussion with former Code for America fellow Scott Silverman who now works as a frontend developer for www.airbnb.com. He gave career advice and shared his experiences working with startups vs larger companies. Talked about the flat organisational structure of startups and orgs. Like how working at CfA allowed for greater autonomy and skillsharing, but it did lead to sometimes not knowing what to do etc. (He worked in a 'cubicle' in a large company previously).

  • 'Big data' workship with a data scientist from Tw

@hale
hale / refactor_steps.md
Created July 20, 2012 00:17
Steps for essential refactoring of the RailsNLP code

ActiveRecord callbacks to update the keywords and wordcounts tables

  • Put the method currently in the RailsNLP module directly in the Article model
  • TDD the refactoring of that method into several smaller methods, which:

When an article is created

  • Analyse all the text fields and parse them into a frequency map of words. { <word_i> => <freq_i>, [...], <word_n> => <freq_n> }
  • For each word in text, kw = Keyword.find_or_create_by_name(word).(i)
  • Create a new Wordcount row with :keyword_id => kw.id, :article_id => article.id and count as the frequency of the keyword in the article.
@hale
hale / todo 20 july 2012.md
Created July 20, 2012 00:22
## TODO for 20 July 2012

TODO for 20 July 2012


  • #33003873 // Some searches crash with 'Sorry but something went wrong'
  • #33003985 // Search offers 'Did you mean?' even when there are no results for the corrected query.
  • #33074453 // Search for 'Satellite City Hall' returns no results.
@hale
hale / brew_install_opencv
Created October 30, 2012 15:27
Installing OpenCV on OS X
➜ ~ brew install opencv
==> Installing opencv dependency: eigen
==> Downloading http://bitbucket.org/eigen/eigen/get/3.1.1.tar.bz2
######################################################################## 100.0%
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/eigen/3.1.1 -DCMAKE_FIND_FRAM
==> make install
/usr/local/Cellar/eigen/3.1.1: 326 files, 3.6M, built in 23 seconds
==> Installing opencv dependency: libtiff
==> Downloading http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz
######################################################################## 100.0%
@hale
hale / robot.js
Created December 1, 2012 10:55 — forked from cezarsa/robot.js
Simple Wall Robot
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
Stopping by Woods on a Snowy Evening
BY ROBERT FROST
Whose woods these are I think I know.
His house is in the village though;
He will not see me stopping here
To watch his woods fill up with snow.
My little horse must think it queer
To stop without a farmhouse near
@hale
hale / pom.xml
Last active December 11, 2015 21:58
pom.xml project configuration file for using the AI for Games dungeon project with Apache Maven
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.abdn.cs3523.dungeon</groupId>
<artifactId>dungeon</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>AI For Computer Games: Dungeon</name>