Skip to content

Instantly share code, notes, and snippets.

View pamolloy's full-sized avatar

Philip Molloy pamolloy

View GitHub Profile
@pamolloy
pamolloy / mls.json
Created October 31, 2011 22:19
A shortened output after crawling the official MLS Soccer Schedule
[
{
"date": "Friday, February 25, 2011",
"team1": "Columbus",
"team2": "Real Salt Lake",
"venue": "Columbus"
},
{
"date": "Tuesday, March 15, 2011",
"goals1": 0,
@pamolloy
pamolloy / wps.json
Created November 4, 2011 20:23
A shortened output after crawling the official WPS soccer schedule
[ [457/4959]
{
"attendance": "4,002",
"date": "Saturday, April 9, 2011",
"goals1": 1,
"goals2": 4,
"team1": "Atlanta Beat",
"team2": "Boston Breakers",
"venue": "KSU Soccer Stadium, Kennesaw, GA"
},
@pamolloy
pamolloy / gist:1348397
Created November 8, 2011 17:10
The output after crawling the official USSF schedule
[
{
"date": "Nov. 11, 2011",
"team1": "U.S. Men",
"team2": "France",
"time": "3 p.m. ET",
"tv0": "ESPN2",
"tv1": "ESPN3",
"tv2": "Univision",
"tv3": "Univision.com",
@pamolloy
pamolloy / gist:1364954
Created November 14, 2011 19:54
Project Euler problem 1 - A function for a generalized solution
def overlap(list):
"""Multiply each element by the following elements
in the list and return a list of each multiple"""
multiples = []
count = 0
for integer in list:
for index in range((count + 1), (len(list) - 1))
multiple = integer * list[index]
@pamolloy
pamolloy / 20120302-sorted.json
Created March 2, 2012 23:44
Sorted list of 2012 USSF and MLS matches as of March 2, 2012
[
{
"goals2": 2,
"goals1": 3,
"venue": "Central Broward Regional Park",
"team1": "Combine AdiPower",
"team2": "Combine Prime",
"date": "Friday, January 6, 2012"
},
{
@pamolloy
pamolloy / gist:2330869
Created April 7, 2012 17:54
Arch Linux LVM Hook Error
Loading ../vmlinux-linux.....
Loading ../initramfs-linux.img......ready.
Probing EDD (edd=off to disable)... ok
Decompressing Linux... Parsing ELF... done.
Booting the kernel.
:: Starting udevd... done.
:: Running Hook [udev]
:: Triggering uevents... done.
:: Running Hook [lvm2]
@pamolloy
pamolloy / ptoken.c
Created June 21, 2012 16:20
Parsing strings with multiple delimiters
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *sep[] = {";", "=", ":", ",", NULL};
char string[] = "entertitle=uncollapse,grabkeys;"
"enterslave=grabkeys;leaveslave=collapse,ungrabkeys;"
"button1=menuexec;button2=togglestick;button3=exit:13;"
"button4=scrollup;button5=scrolldown;"
"key_Up=scrollup;key_Down=scrolldown;"
@pamolloy
pamolloy / gist:3977017
Created October 29, 2012 22:46
Connecting to a wireless access point
Script started on Mon 29 Oct 2012 04:30:00 PM EDT
[root@edwin philip]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:22:43:87:07:e1 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.4/24 brd 10.0.0.255 scope global wlan0
@pamolloy
pamolloy / affixe.txt
Created November 19, 2012 16:09
Affixe vom Grammatische Woerterbuch auf ids-mannheim.de
a- (ahistorisch) (Affix)
a- (Apräsenz) (Affix)
-abel (akzeptabel) (Affix)
-ade (Marinade) (Affix)
-ade (Robinsonade) (Affix)
-age (Sabotage) (Affix)
-age (Spionage) (Affix)
-aille (Diplomaille) (Affix)
-al (instrumental) (Affix)
-al (optimal) (Affix)
@pamolloy
pamolloy / vimrc
Last active December 14, 2015 20:19
An in-progress vim configuration file
" SHOW INVISIBLES
" vimcasts.org/episodes/show-invisibles/
" Disable syntax highlighting for Markdown files
autocmd BufRead,BufNewFile *.md syntax off
" Shortcut to toggle `set list` with `\l`
" Note the "mapleader" variable is set to backslash by default
nmap <leader>l :set list!<CR>