Skip to content

Instantly share code, notes, and snippets.

View cadams500's full-sized avatar

Chris Adams cadams500

View GitHub Profile
@cadams500
cadams500 / git-tag-sync
Created February 24, 2012 17:55
Synchronize Git Tags With Remote
git tag -l | xargs git tag -d
git fetch
@cadams500
cadams500 / mysql-multi-table-delete
Created April 3, 2012 18:04
Mysql Multi-Table Delete
delete
from
t1, t2, t3
using
t1
join
t2 on t1.id = t2.id
join
t3 on t2.id = t3.id
where
@cadams500
cadams500 / eds-api-getdomains.java
Last active December 18, 2015 08:49
Example eDataSource API Usage
/*
* VERY raw way to read a restful API endpoint.
* This code can be refined and made into a very simple REST library quite easily.
*
* Code has not been tested and should be taken as pseudo-code.
*/
String apiKey = "myapi-key";
URL url = new URL("http://api.emaildatasource.com/service/2.0.0/rest/api.service.engagements?method=getAvailableDomains&api-key=" + apiKey);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
@cadams500
cadams500 / macos-setjdk
Created February 17, 2014 01:59
Mac OS - Set JDK
alias jdkls='/usr/libexec/java_home -V 2>&1 | grep -E "\d.\d.\d_\d\d" | cut -d , -f 1 | colrm 1 4 | grep -v Home'
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
function setjdk() {
export JAVA_HOME=$(/usr/libexec/java_home -v $1)
export PATH=$JAVA_HOME/bin:$PATH
java -version
}
{
"feed": {
"version": "2.0",
"title": "Playbill Post",
"items": [
{
"title": "Meet the Full Cast Bringing the Good Word to Broadway in Tammy Faye",
"link": "https://playbill.com/article/meet-the-full-cast-bringing-the-good-word-to-broadway-in-tammy-faye",
"guid": "https://playbill.com/article/meet-the-full-cast-bringing-the-good-word-to-broadway-in-tammy-faye#815f1c13-9290-47d7-ac31-91267c9a9df1",
"description": "See who's joining previously announced stars Katie Brayben and Christian Borle in the Elton John-Jake Shears-James Graham musical.",