Skip to content

Instantly share code, notes, and snippets.

💭
10x Ninja Rockstar

Adam Loving adamloving

💭
10x Ninja Rockstar
Block or report user

Report or block adamloving

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adamloving
adamloving / fb-fan-export.js
Created Jan 18, 2011
Export Facebook Page Fans
View fb-fan-export.js
/*
For more detailed instructions on how to use this script, sign up with your email here:
http://adamloving.com/internet-programming/how-toexport-facebook-page-fans
DISCLOSURE: This javascript runs in your browser pretending to be you
looking through your page fans. Facebook should have no problem with this,
but who knows if they will think it is strange to see you looking through
all your fans so quickly (the script waits 3s before requesting each page).
I've had no problem running this so far for 1000s of page fans, but I
@adamloving
adamloving / sms.rb
Created Jan 31, 2011
Simple Twilio Ruby Client Class
View sms.rb
require 'twiliolib'
ACCOUNT_SID = 'big-hex-number'
ACCOUNT_TOKEN = 'another-big-hex-number'
# version of the Twilio REST API to use
API_VERSION = '2010-04-01'
# base URL of this application
BASE_URL = "http://myapp.com"
@adamloving
adamloving / stack-template.md
Created Feb 1, 2011
Fork this and describe your favorite development stack
View stack-template.md

Development Environment

  • Platform
  • IDE
  • Editing Font
  • Source Code Repo/host

Hosting

  • Hosting Provider
@adamloving
adamloving / kairos-stack.md
Created Feb 1, 2011
Components of the Kairos Stack
View kairos-stack.md

Development Environment

  • Platform: OS X 10.6.6
  • IDE: Textmate
  • Editing Font: Monaco 18pt
  • Source Code Repo/host: github

Hosting

@adamloving
adamloving / twibes-stack.md
Created Feb 1, 2011
Components of the software stack for Twibes.com
View twibes-stack.md

Stack for twibes.com

Development Environment

  • Platform: Mac OS X 10.6.6
  • IDE: TextMate
  • Editing Font: Monaco 18pt
  • Source Code Repo/host: SVN/Unfuddle (prefer git nowadays)

Hosting

@adamloving
adamloving / cache_manager.js
Created Feb 1, 2011
A class to monitor background updates to a HTML based iPhone application
View cache_manager.js
/*
A class to monitor background updates to a HTML based iPhone application.
Note that this needs to be used in conjunction with an HTML5 Cache Manifest file
This originated from some sample code in this book:
http://www.amazon.com/Building-iPhone-Apps-HTML-JavaScript/dp/0596805780
*/
@adamloving
adamloving / installer_controller.rb
Created Feb 1, 2011
Rails controller action for an HTML5 cache manifest file.
View installer_controller.rb
class InstallerController < ApplicationController
# Rails controller action for an HTML5 cache manifest file.
# Generates a plain text list of files that changes
# when one of the listed files change...
# So the client knows when to refresh its cache.
def cache_manifest
@files = ["CACHE MANIFEST\n"]
@files << 'favicon.ico'
@adamloving
adamloving / bigdoorkit-sample.py
Created Mar 1, 2011
how to use BigDoorKit to create a user and award XP
View bigdoorkit-sample.py
import client
import restkit
app_key = 'xxx'
app_secret = 'yyy'
c = client.Client(app_secret, app_key)
username = 'adamloving'
View installing-MySql-Python-adapter-using-macports.txt
sudo port install mysql5
sudo port install py26-mysql
get the junk from here
http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/
decompress it, then follow the instructions in readme
MySQL-python-1.2.3$ python setup.py build
MySQL-python-1.2.3$ sudo python setup.py install
@adamloving
adamloving / inheritance.js
Created Apr 13, 2011
Simulating inheritance with Javascript
View inheritance.js
// I'm not sure which of these is the best, they all have pros and cons.
// for more ideas, see http://ejohn.org/blog/simple-javascript-inheritance/
// ----- 1 [using functions as objects with prototypes]-----
function MyBaseClass() { };
MyBaseClass.prototype.myMethod = function() { };
function MyClass() {
MyBaseClass.call(this); // call base class constructor
You can’t perform that action at this time.