Skip to content

Instantly share code, notes, and snippets.

View gbinal's full-sized avatar

Gray Brooks gbinal

View GitHub Profile
{
"kind": "pagespeedonline#result",
"id": "https://www.fbi.gov/",
"responseCode": 200,
"title": "FBI — Homepage",
"ruleGroups": {
"SPEED": {
"score": 61
}
},
import csv
import re
import json
def readData(inputFile):
outList = []
with open(inputFile, 'rU') as infile:
reader = csv.reader(infile)
firstRow = True
for row in reader:
this is a snippet
@gbinal
gbinal / gist:f34857b6920872141b9e
Created March 11, 2015 13:15
data inventories list: 3-11-15
[
{
"Domain Name":"BCFP.GOV",
"Domain Type":"Federal Agency",
"Agency":"Consumer Financial Protection Bureau",
"City":"Washington",
"State":"DC",
"Data URL":"http://bcfp.gov/data.json",
"id":"bcfp.gov"
},
<iframe allowtransparency="true" frameborder="0" scrolling="no" seamless="seamless"
src="http://graybrooks.com/gh-activity/gh-activity.html?user=18f&type=user" width="300" height="300"></iframe>
@gbinal
gbinal / gist:7130193
Created October 24, 2013 02:15
google query chunks for bulk searching across an agency's web presence
=========================================================
Energy
site:EIA.GOV OR site:ENERGY.GOV OR site:ENERGYSAVER.GOV OR site:ENERGYSAVERS.GOV OR site:NREL.GOV OR
@gbinal
gbinal / SMR Embed Sample 1
Last active December 16, 2015 13:59
Sample code for embedding an agency list of accounts into 3rd party sites. Registry.USA.gov
<div id="content">
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var services = ['Facebook', 'Twitter']
for (var j = 0; j < services.length; j += 1) {
var service = services[j];
$("#content").append("<h2>" + service + "</h2><ul id=\"" + service.toLowerCase() + "\"></ul>");
var url = "http://registry.usa.gov/accounts.json?service_id=" + service.toLowerCase() +"&agency_id=epa";
@gbinal
gbinal / gist:3899678
Created October 16, 2012 14:39
Mobile code components
Mobile needs for common code components:
-ecommerce
information collecting
maps
bar code scanning library
menus
authentication
@gbinal
gbinal / gist:3869321
Created October 11, 2012 00:06
Assorted API language for contracts
FCC contract
Mobile Apps mod
@gbinal
gbinal / gist:3514850
Created August 29, 2012 16:01
First Round Goals for .gov github mashups
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