Skip to content

Instantly share code, notes, and snippets.

View benmj's full-sized avatar
:shipit:

Ben Jacobs benmj

:shipit:
View GitHub Profile
@benmj
benmj / Books.md
Created January 3, 2013 15:45
Book Wishlist / To-Read List

Books

General Fiction and Non-Fiction

  1. The Honest Truth About Dishonesty (Radiolab?)
  2. An Economist Gets Lunch
  3. Exit Voice and Loyalty - A O Hischman
  4. The Rook - Kevin O'Malley. Dad recommends.
  5. 14 Minutes - Alberto Salazar (distance runner. NYorker article)
  6. Monkey Love - by Robert S. on Radiolab
@benmj
benmj / Resume1-11-2013.md
Created January 11, 2013 16:48
Current Resume

Ben Jacobs

Web and Mobile Developer

815 West Princeton Ave / Fresno, CA 93705
(559) 286 - 5662
benmillerj@gmail.com

Summary

  • A web and mobile developer comfortable working in a variety of platforms such as PHP, HTML5, Javascript, jQuery, Objective-C, Delphi, SQL, MongoDB, Joomla Framework, and Symfony Framework
@benmj
benmj / goodreads.py
Created January 17, 2013 00:41
fooling around with goodreads api
# http://www.goodreads.com/book/title.xml?author=Roberto+Bola%C3%B1o&key=Iz76TB8T47u8g4T90VKg&title=Savage+Detectives&format=json
body = urllib.urlencode({ 'author' : 'Karen Russel', 'title' : 'Swamplandia', 'format' : 'json' })
response, content = client.request('%s/book/title.xml' % url,
'GET', body, headers)
body = urllib.urlencode({'name': 'read', 'book_id': 8584686})
headers = {'content-type': 'application/x-www-form-urlencoded'}
response, content = client.request('%s/shelf/add_to_shelf.xml' % url,
import oauth2 as oauth
import urlparse
url = 'http://www.goodreads.com'
request_token_url = '%s/oauth/request_token/' % url
authorize_url = '%s/oauth/authorize/' % url
access_token_url = '%s/oauth/access_token/' % url
consumer = oauth.Consumer(key='Your-GoodReads-Key',
secret='Your-GoodReads-Secret')
#!/usr/bin/env python
# -*- coding: utf8 -*-
import oauth2 as oauth
import urlparse
import os
import urllib
import sys
import json
from pprint import pprint
@benmj
benmj / bookmark.txt
Created February 1, 2013 06:11
Where to pick up
http://symfony.com/doc/current/book/doctrine.html#saving-related-entities
<?php
foreach ($_FILES as $file) {
switch($file['error']) {
case UPLOAD_ERR_INI_SIZE:
error_log("The uploaded file exceeds the upload_max_filesize directive in php.ini. : " . $file['name']);
break;
case UPLOAD_ERR_FORM_SIZE:
error_log("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form. " . $file['name']);
@benmj
benmj / google-table-directive.js
Created February 27, 2013 23:33
An AngularJS Directive for creating a table using the Google Visualization API
/*
I'm converting an existing web-app to angular. We made extensive use of the
Google Visualization library in the past. It's a powerful, although
complicated API, so I was anxious to get it wrapped up in angular. This
populates a table with data returned from a custome service 'Account'
*/
'use strict';
/* Directives */
@benmj
benmj / transactions-overview.html
Created February 28, 2013 22:26
ng-repeat on selection
<h2>{{ transaction.Title || "Transactions" }}</h2>
<label for="selectedYear">View transactions from: </label>
<select name="selectedYear" ng-model="selectedYear">
<option ng-repeat="year in years">{{year}}</option>
</select>
<h1>Alert</h1>
<p>Bootstrap JS</p>
<div class="alert fade in">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong>Holy guacamole!</strong> Best check yo self, you're not looking too good.
</div>
<p></p><a ng-click="alert=true">Open Alert (AngularJS)</a></p>
<div class="alert fade" ng-class="{in:alert}">
<button type="button" class="close" ng-click="alert=false">×</button>