Skip to content

Instantly share code, notes, and snippets.

View robertcedwards's full-sized avatar
🖼️
Framing

Robert C Edwards robertcedwards

🖼️
Framing
View GitHub Profile
#!/usr/bin/env ruby -rjcode -Ku
require 'rss/2.0'
require 'open-uri'
require 'time'
class RSSFetcher
RED = "\033[1;31m"
GREEN = "\033[32m"
YELLOW = "\033[33m"
@didip
didip / supervisord-example.conf
Created December 31, 2010 01:44
Example for supervisord conf file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@robertcedwards
robertcedwards / php git pull
Created May 5, 2011 15:56
Git pull backticks in php
<?php `git pull`;?>
@olivierlacan
olivierlacan / launch_sublime_from_terminal.markdown
Created September 5, 2011 15:50
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@jconnoll
jconnoll / gist:1215643
Created September 14, 2011 01:29
Shopify - Get Count of Products in Collection from Linklist
{% for link in linklists.clothing.links %}
{% paginate link.object.products by 9999 %}
COUNT: {{ link.object.all_products_count }} <br>
{% endpaginate %}
{% endfor %}
@hwatkins
hwatkins / ratings.rb
Created December 2, 2011 23:15
A script to use the Netflix paginated "What You've Rated" to pull what you have rated in Netflix. This call is not exposed in the Netflix API so it's hard to get any other way. This is quick and dirty so not the best Ruby constructs.
#!/usr/bin/env ruby
require 'iconv'
require 'nokogiri'
# This is a simple script to spider your Netflix paginated "What You've Rated" list.
# It requires an OS X based system with Ruby 1.9+, Safari, and AppleScript
#
# I could not find a way to back up my ratings (for all titles, not just my rental activity)
# without registering for a Netflix API key or handing my Netflix credentials over to someone
# who had an API key, so I decided to take a brute force approach and just parse the HTML for
@norcross
norcross / gist-sidebar-widget
Created December 24, 2011 03:24
Public Gist Sidebar Widget
<?php
/*
Plugin Name: GitHub Gists Sidebar Widget
Plugin URI: http://andrewnorcross.com/plugins
Description: A sidebar widget to display your public gists from GitHub.
Version: 1.0
Author: norcross
Author URI: http://andrewnorcross.com
*/
/* Copyright 2012 Andrew Norcross
@leumund
leumund / busstop-arduino
Created January 4, 2012 06:39
#busstop arduino
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
created 21 May 2011
by Tom Igoe
This code is in the public domain.
*/
#include <SPI.h>
@SergXIIIth
SergXIIIth / gist:1628715
Created January 17, 2012 20:31
The first Arduino HTTP request
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x00, 0xAB, 0xCB, 0xCD, 0xDE, 0x02 };
IPAddress ip(192,168,0,140);
IPAddress server(173,194,70,103);
EthernetClient client;
@dalethedeveloper
dalethedeveloper / gist:1846552
Created February 16, 2012 17:18
Techniques for Anti-Aliasing @font-face on Windows

#Techniques for Anti-Aliasing @font-face on Windows

It all started with an email from a client: Do these fonts look funky to you? The title is prickly.

The font in question was Port Lligat Sans from Google Web Fonts.

The "prickly" is aliasing caused by lack of hinting