Skip to content

Instantly share code, notes, and snippets.

@andyfoster
andyfoster / web-servers.md
Created January 6, 2016 06:07 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@andyfoster
andyfoster / fourSquareAPI.js
Created December 31, 2015 03:45 — forked from molinto/fourSquareAPI.js
Titanium FourSquare API Integration
/*
Author: James Shrager (@jshrager)
Intended use: Appcelerator Titanium
Usage: http://www.LearningTitanium.com (@learningTi)
*/
var client_id = "YOUR_CLIENT_ID";
var client_secret = "YOUR_CLIENT_SECRET";
var redirectUri = 'http://YOUR_URL/foursquareCallback.php';
var ui = require('ui/ui');
@andyfoster
andyfoster / dabblet.css
Created November 24, 2015 08:22 — forked from jackie/dabblet.css
FizzBuzz with CSS
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
@andyfoster
andyfoster / dabblet.css
Created November 24, 2015 08:21 — forked from ggamel/dabblet.css
FizzBuzz with CSS
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
@andyfoster
andyfoster / weather.rb
Created November 21, 2015 00:33 — forked from dan-c-underwood/weather.rb
Alternate version (with Emoji) of the Today-Scripts weather script.
require "json"
require "net/http"
require "colorize"
def formatTemp(temp)
temp_i = temp.to_i
temp = temp + "°C"
case
when temp_i <= 0
temp.colorize(:blue)
@andyfoster
andyfoster / curl.md
Created November 3, 2015 01:12 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@andyfoster
andyfoster / 0_reuse_code.js
Created November 2, 2015 20:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@andyfoster
andyfoster / testfile1.txt
Created November 2, 2015 05:02
Using Postman to write to API
I'm some content
@andyfoster
andyfoster / gist:ee55ead1df132222321a
Last active November 10, 2015 20:23
Created via API
We couldn’t find that file to show.
@andyfoster
andyfoster / README.md
Last active September 22, 2015 03:56 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007