Skip to content

Instantly share code, notes, and snippets.

View aguestuser's full-sized avatar

Austin Guest aguestuser

View GitHub Profile
@aguestuser
aguestuser / init.el
Created August 14, 2015 00:34
my init.el
;;; init.el --- Prelude's configuration entry point.
;;
;; Copyright (c) 2011 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: http://batsov.com/prelude
;; Version: 1.0.0
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@aguestuser
aguestuser / pairingNotes_20150622.js
Last active August 29, 2015 14:23
Notes from Tim & Austin Pairing
/*
BIG TAKEAWAY LESSON:
* stop and ask yourself: "WHAT PROBLEM AM I TRYING TO SOLVE RIGHT NOW"
* particularly when the code starts pushing you around
* you can tell the code is pushing you around when:
* things are breaking
* you start chasing frantically from error message to error message
@aguestuser
aguestuser / brokenCombox.jsx
Last active August 29, 2015 14:22
abortive attempt at combobox
const BaseComponent = require('./BaseComponent');
const Marty = require('marty');
const { Combobox, configure } = require('react-widgets');
configure.setGlobalizeInstance(window.globalize)
const lsApi = require('../api/lsApi');
// unsurprisingly: this doesn't work
// produces error that says "combobox has no contents"
class SearchBox extends BaseComponent {
;;; init.el --- Prelude's configuration entry point.
;;
;; Copyright (c) 2011 Bozhidar Batsov
;;
;; Author: Bozhidar Batsov <[email protected]>
;; URL: http://batsov.com/prelude
;; Version: 1.0.0
;; Keywords: convenience
;; This file is not part of GNU Emacs.
@aguestuser
aguestuser / ls_install.md
Created May 12, 2015 21:53
LS INSTALL NOTES

Installing LS

Download MySQL dump

  • not secure to hand this out

  • tables to be removed:

    • api_request
  • api_user

@aguestuser
aguestuser / keybase.md
Created April 27, 2015 01:51
keybase.md

Keybase proof

I hereby claim:

  • I am aguestuser on github.
  • I am aguestuser (https://keybase.io/aguestuser) on keybase.
  • I have a public key whose fingerprint is 0995 5956 FCCE 9986 E81C C8FC E58B D15A 1D4E FD5B

To claim this, I am signing this object:

@aguestuser
aguestuser / littlesis-centrality.py
Created April 26, 2015 23:44
Matthew's Script for Calculating Centrality among LS entities
import sys
import MySQLdb as my
import networkx as nx
import csv
from IPython import embed
db = my.connect(host='localhost', user='littlesis', passwd='midm681_beet', db='littlesis')
cur = db.cursor(my.cursors.DictCursor)
# all positions
@aguestuser
aguestuser / construct.js
Last active August 29, 2015 14:18
crockford on constructors
// pseudo-classical v1
var Mammal = function(name){
this.name = name;
this.get_name = function(){
return this.name;
};
this.purr = function() {
return "purr"
};
@aguestuser
aguestuser / dedupeTests.js
Created March 19, 2015 01:07
Home spun tests for FP deduping thing for Tim
var _ = require('underscore');
// getDupeList([Tweet]) -> { String : [Int] }
// runs in O(n+m) where n is # tweets, m is # dupes
function getDupeList(ts){
var tts =_.chain(ts)
.map(function(t,i){ return _.extend(t, { i: i });})
.groupBy(function(tt){ return tt.id_str;})
.value();
return _.chain(tts)
var _ = require('underscore');
// getDupeList([Tweet]) -> { String : [Int] }
// runs in O(n+m) where n is # tweets, m is # dupes
function getDupeList(ts){
var tts =_.chain(ts)
.map(function(t,i){ return _.extend(t, { i: i });})
.groupBy(function(tt){ return tt.id_str;})
.value();
return _.chain(tts)