GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
class AppDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
PixateFreestyle.initializePixateFreestyle | |
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
@window.rootViewController = UIViewController.alloc.init | |
@window.styleMode = PXStylingNormal | |
@button = UIButton.buttonWithType UIButtonTypeSystem |
Needs: Should not require any code libraries from the host website but rather should be simple html while still static. [Note the iframe model used at http://www.nasa.gov/digitalstrategy/ via http://goo.gl/bzHH2 (code- http://goo.gl/StAvQ)] | |
Goals: | |
1. Widget for most recent commits from one github org (note - https://github.com/presidential-innovation-fellows/mygov/blob/gh-pages/_includes/js/commits.js ) | |
2. Widget for most recent commits from all registered .gov github orgs, pulled dynamically from the SMR api | |
3. Widget for most active repos from one github org | |
4. Widget for most active repos from all registered .gov github orgs, pulled dynamically from the SMR api | |
5. Widget for most recent public activity from one github org |
GitHub webhooks for a URL by default only fire on repo pushes. There appears to be no way in the web UI to set up webhooks for other events. And so we go to the API. I prefer to do this type of thing with Hurl.
{
"name": "web",
"active": true,
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler' | |
require 'fileutils' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
TMP_DIR = "/tmp/gems" |
<?php | |
# Configure | |
$DB_USER = 'admin'; | |
$DB_PASS = 'qwerty'; | |
$DB_HOST = 'localhost'; | |
$DB_NAME = 'postgis-2-0'; | |
// Param 3 when ran in shell will override this value | |
$DB_TABLE = 'public.florida_establishments_garman'; | |
// Param 2 when ran in shell will override this value | |
$CATEGORY = 'misc'; |
.DS_Store | |
*.log | |
Gemfile.lock |
#See: http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
import re, urllib | |
GRUBER_URLINTEXT_PAT = re.compile(ur'(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))') | |
for line in urllib.urlopen("http://daringfireball.net/misc/2010/07/url-matching-regex-test-data.text"): | |
print [ mgroups[0] for mgroups in GRUBER_URLINTEXT_PAT.findall(line) ] | |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'roo' | |
pwd = File.dirname(__FILE__) | |
Dir.glob("#{pwd}/*.xls") do |file| | |
file_path = "#{pwd}/#{file}" | |
file_basename = File.basename(file, ".xls") | |
xls = Excel.new(file_path) |