Skip to content

Instantly share code, notes, and snippets.

View mitchellhislop's full-sized avatar

Mitchell Hislop mitchellhislop

View GitHub Profile
require 'rubygems'
require 'gattica'
class ExtractKeywords
def initialize(email,password)
@gs = Gattica.new(email,password)
end
def get_accounts
results = []
@gs.accounts.each{|account|
.block { display: block; }
.inline { display: inline; }
.clrfix { display:inline-block; }
.hide { display: none; }
.fleft { float: left; }
.fright { float: right; }
.fclear { clear: both; }
.hi { background-color: rgb(255, 255, 204); }
.sub { vertical-align: sub; }
.super { vertical-align: super; }
<iframe src="http://www.facebook.com/plugins/like.php?href=http%253A%252F%252Fautorepairpro.net&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=recommend&amp;font&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>
Change the HTML at the top to:
<html xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:fb="http://www.facebook.com/2008/fbml">
Add these in the <head>
<meta property="og:title" content="Auto Repair Shop Search"/>
<meta property="og:site_name" content="Your Neighborhood Auto Repair Pro"/>
<?php
class Scrape {
public $headers = array();
public $result;
public $error;
#!/usr/bin/env ruby
# twail.rb
# Twitter stream tail
# Copyright 2010 Jonathan Rudenberg
# Licensed under the MIT License
#
# Prerequisites: gem install json twitter-stream
require 'optparse'
CREATE TABLE `user` (
`twitter_id` int(10) unsigned NOT NULL,
`created_at` timestamp NOT NULL default '0000-00-00 00:00:00',
`name` varchar(80) NOT NULL,
`screen_name` varchar(30) NOT NULL,
`location` varchar(120) default NULL,
`description` varchar(640) default NULL,
`profile_image_url` varchar(400) NOT NULL,
`url` varchar(100) default NULL,
@mitchellhislop
mitchellhislop / directions_view.php
Created December 7, 2010 19:35
PHP Google Directions API
<head>
<title>Your Trail</title>
</head>
<body>
<h1>Your Trail</h1>
<?php
echo "<br />";
echo '<h1>Directions:</h1>';
echo '<h2>Start: '.$origin.'</h2>';
foreach ($directions->route as $route)
- simple
- public over private
- personal vanity
- internet is global
- permalinks
- one important item per page
- don't break the browser
- don't wanker in technology
- a medium is not a grande
- break convention for your users
@mitchellhislop
mitchellhislop / Multi-cell functions in GDocs
Created February 16, 2011 18:00
This is the starting point for doing multi-cell work in one cell
=arrayformula(sum({d4:d50} * (.01*{g4:g50})))