Skip to content

Instantly share code, notes, and snippets.

@dmolsen
dmolsen / Facebook + Twitter Fan Count
Created September 27, 2010 15:47
Pulls the Facebook fan count and Twitter follower count for the specified accounts.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
var f_page = "wvumountaineers"; // the page name for your fan page, e.g. the 'wvumountaineers' part of http://facebook.com/wvumountaineers
var t_page = "westvirginiau"; // the account name for your main twitter account
function add_commas(number) {
if (number.length > 3) {
var mod = number.length % 3;
@alunny
alunny / description.md
Created November 26, 2010 22:22
my git configuration

My Git Configuration

For best results, use hub and git bash completion (included with git under contrib/completion).

@funkatron
funkatron / chrometest.sh
Created February 9, 2011 15:20
To do testing on local HTML/JS apps in Chrome, I start it with this script to disable some security checks.
#!/bin/bash
# USAGE: /path/to/chrometest <localfile.html>
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--disable-web-security \
--allow-file-access-from-files \
--allow-file-access \
--log-level 3 \
$@
@jed
jed / LICENSE.txt
Created May 10, 2011 16:04 — forked from 140bytes/LICENSE.txt
write contextual templates
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@subzey
subzey / LICENSE.txt
Created June 5, 2011 08:07 — forked from bytespider/LICENSE.txt
140byt.es -- encodeURIComponent based convert string to array of UTF-8 bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tvandervossen
tvandervossen / gist:1231476
Created September 21, 2011 07:33
Mobile Safari viewport sizes on iOS 4.3 and 5
iPad
1024 × 690 In landscape on iOS 4.3
1024 × 672 In landscape on iOS 5
768 × 946 In portrait on iOS 4.3
768 × 928 In portrait on iOS 5
1024 × 660 Always showing bookmarks bar in landscape on iOS 4.3
1024 × 644 Always showing bookmarks bar in landscape on iOS 5
768 × 916 Always showing bookmarks bar in portrait on iOS 4.3
@tnydwrds
tnydwrds / jquery_transport.js
Created October 14, 2011 15:51
Quick jQuery Transport sample
// This is currently just a proof of concept. My OAuth usage requires setting
// a cookie client-side (server does not do this) after successful authentication.
// AIR runtime does not allow XHR to set cookie header so I had to use AIR's
// URLRequest object.
//
// I imagine you can do the same thing but use jsOAuth.request or something in
// place of URLRequest
//
// http://api.jquery.com/extending-ajax/#Transports
@peterjmit
peterjmit / benchmark.sh
Created October 10, 2012 10:49
Bash Benchmark Script (using time)
#!/bin/bash
# REQUIRES SUDO
# Benchmark runner
repeats=20
output_file='benchmark_results.csv'
command_to_run='echo 1'
run_tests() {
# --------------------------------------------------------------------------
@max-mapper
max-mapper / readme.md
Last active October 12, 2015 10:17
introduction to node

Node.js Resources

What is node.js?

Node.js is just JavaScript running on the server side. That's it. That's all there is to it.

Express

  • Express Docs, if you want to get started and already know JavaScript this is the place to be