Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am srobbin on github.
  • I am srobbin (https://keybase.io/srobbin) on keybase.
  • I have a public key whose fingerprint is BE65 F562 65A2 A60D BEE3 C113 8897 358A 156F B0C0

To claim this, I am signing this object:

notes.factory('Notes', function($resource) {
return $resource('/notes/:id.json', {id: '@id'});
});
notes.factory('UserNotes', function($resource) {
return $resource('/user/:user_id/notes/:note_id.json', {user_id: '@user_id', note_id: '@note_id'});
});
UserNote.query({user_id: 3})
UserNote.get({user_id: 3, note_id: 1})
/*
* Flower - jQuery plugin for pie menus
*
* Author: Aza Raskin
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
@srobbin
srobbin / gist:6612855bdc53becae704
Created August 3, 2014 20:26
FCC Comment Scraper
require 'mechanize'
require 'csv'
require 'net/http'
count = 1
site = "http://apps.fcc.gov"
last_id = 6018081653
agent = Mechanize.new
allowed_fields = [
'Proceeding Number:',
@srobbin
srobbin / million-dollar.yml
Created November 13, 2014 18:58
Million Dollar YAML
-
coords: "630,310,640,320"
href: "http://www.getpixel.net"
title: "getpixel.net, stock photography"
-
coords: "850,50,860,60"
href: "http://www.mynewbritain.com"
title: "MyNewBritain.com"
-
coords: "390,280,420,310"
#!/usr/bin/python
"""
Performs the basic setup instructions for a new Expression Engine install
as outlined here: http://expressionengine.com/docs/installation/installation.html
Accepts:
One parameter: if you'd like to rename the system folder (recommended, but optional)
Usage:
var images = [ "/path/to/image1.jpg",
"/path/to/image2.jpg",
"/path/to/image3.jpg",
"/path/to/image4.jpg"],
randNum = Math.floor( Math.random() * images.length );
$.backstretch( images[randNum] );
<!-- Typical script include -->
<script src="/_scripts/file1.js"></script>
<script src="/_scripts/file2.js"></script>
<script src="/_scripts/file2.js"></script>
<!-- Using Minify, it becomes this -->
<!-- http://code.google.com/p/minify/ -->
<script src="/_min/b=_scripts&f=file1.js,file2.js,file.js"></script>
<!-- Google-hosted jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
# Add to your .htaccess file
FileETag none
ExpiresActive On
ExpiresDefault A0
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A2592000
ExpiresByType text/css A2592000