Skip to content

Instantly share code, notes, and snippets.

@justgrimes
justgrimes / gist:71fd98441d865714899a
Created July 7, 2015 22:52
awk one liner for checking lines for quote mismatches (aka odd quote counts by line)
awk -F'|' 'BEGIN{print "COUNT,", "LINE"}{print gsub(/"/,"") "," NR}' file
@justgrimes
justgrimes / BuildingSMSappExample.md
Last active August 29, 2015 14:24
Simple SMS Application using Twilio, Lua, & webscripts.io

Building SMS Applications with Twilio

With over 3.5 billion active users, SMS (Short Message Service) is one of the most widely used data applications in the world. In the United States over 91% of adults own cell phone. Text messaging can be an incredibly useful way for delivering services and information to people.

So today, I'm going to show you how you can create a super simple light weight SMS application with just a few lines of code using Twilio, Lua, webscript.io, and Socrata's Open Data API (SODA). Twilio is a wonderful service that provides a HTTP API that allows people to build quick and easy SMS & voice applications. Lua is lightweight scripting language and [webscript.io](https://www.webscri

@justgrimes
justgrimes / opm-fedscope-workforce-data.r
Last active February 21, 2017 22:06
OPM Fedscope Data - Cleaning and Loading
## OPM Workforce Data
## FedScope Employment Cube RAW Data Sets for general public consumption
## Justin Grimes
# Load necesary packages
#install.packages("curl")
#library(curl)
#install.packages("RCurl")
#library(RCurl)
@justgrimes
justgrimes / fedweb_screenshots.py
Created December 16, 2024 20:33
Screenshots for federal domains using pikwy api
#Loop thru csv of federal domains, write screenshots
#!/usr/bin/python3
import csv
import urllib.request
import urllib.parse
import time
from datetime import datetime
#CISA list of Federal domains https://raw.githubusercontent.com/cisagov/dotgov-data/main/current-federal.csv