Skip to content

Instantly share code, notes, and snippets.

View sabersd's full-sized avatar

Doug Sabers sabersd

  • Public SQ
  • Minneapolis MN
View GitHub Profile

Keybase proof

I hereby claim:

  • I am sabersd on github.
  • I am lightsabersd (https://keybase.io/lightsabersd) on keybase.
  • I have a public key ASDuBD8rO5uvJAAJBPyb7Lu-LYjlAhhgFTIAMTxcijm3wAo

To claim this, I am signing this object:

@sabersd
sabersd / copy_cql.cql
Created June 19, 2015 20:35
Bulk load C* using Copy command
COPY messages (messagekey, languagecode, message) from '/Users/sabers/Development/st/SmartThings/trans_smartapp_desc.txt' WITH DELIMITER = '\t';
@sabersd
sabersd / grep_title_text
Created June 19, 2015 20:31
grep files for title text
grep -r 'title:' * |sed 's/.*title://' |sed 's/\",.*//' | sed 's/^[ \t]*//' | sed 's/^"//' |sed 's/\") {//' | sed 's/\")//' | sort -u
@sabersd
sabersd / mTranslate.groovy
Last active August 29, 2015 14:23
Groovy using the Microsoft Translate Api
@Grab(group = 'org.codehaus.groovy.modules.http-builder', module = 'http-builder', version = '0.7')
import groovy.json.JsonSlurper
import groovyx.net.http.HTTPBuilder
import static groovyx.net.http.ContentType.JSON
import static groovyx.net.http.ContentType.XML
import static groovyx.net.http.Method.GET
import static groovyx.net.http.Method.POST
def file = new File("/Users/sabers/Development/st/SmartThingsEnterprise/enterprise_smartapp.txt")
@sabersd
sabersd / cqlConnect.groovy
Last active December 27, 2015 14:59
small script for connecting to cassandra using the Java driver
/*
cql to run the examples
create table users( username varchar, fname varchar, lname varchar, address varchar, PRIMARY KEY (username, fname));
insert into users(username, fname, lname, address) values ('sabers1', 'doug', 'Sabers', 'maple grove');
insert into users(username, fname, lname, address) values ('sabers2', 'doug', 'Sabers', 'maple grove');
*/
@Grab(group='com.datastax.cassandra', module='cassandra-driver-core', version='1.0.4')
import com.datastax.driver.core.Cluster