View .sh
brew install openssl libmicrohttpd
git clone
cd xmr-stak-cpu
mkdir build && cd build
cmake -DHWLOC_ENABLE=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include/ ..
View interview
# well not sure how far u wanted that to go..
# I had to google some quick info/docs. for ex forgot method notation meaning of !
# Otherwise I think import stuff should be here. Relationships of models (which I am not 100% on but
# I would figure it out from docs if spent more time..), business logic, exceptions and
# transactions..
# I havent used rails in a while so little rusty but I know I could always get back up to speed
# really quick.. Had to learn React this week for ex..
# Hope its good enough, left a lot of comments to explain the craziness. Thanks for your time
View AnotehrITerator
var arr = [4,5,6,7,8,9];
for (var v of arr) {
console.log( v );
// 4 5 6 7 8 9
// define iterator that only produces values
// from odd indexes
arr[Symbol.iterator] = function*() {
var idx = 1;
do {
View wtfES6
let fibonacci = {
[Symbol.iterator]() {
let pre = 0, cur = 1;
return {
next(p) {
pre = cur
cur = pre + cur
//[pre, cur] = [cur, pre + cur];
if (cur < 100) {
View gist:7de8521fae589870e38e
********** sending message:
'SpeedGauge - Monthly Group Summary Report (0.0%) 2015-01-01'
From: u'SpeedGauge Reports <>'
To: [u'']
> /Users/bbarrows/repos/_sg_venv/lib/python2.7/site-packages/sg/report/
-> return True
(Pdb) c
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:9695784082d248ba8a4e
#!/usr/bin/env python
from os import listdir
from os.path import isfile, join
from subprocess import Popen, PIPE, STDOUT, call
import MySQLdb
import MySQLdb.cursors
import types
import warnings
import threading, logging, traceback
import sys, time
class LiveThread(threading.Thread):
def __init__(self, function_to_quit_the_process, thread_wait_in_seconds=1,
clean_up_wait_in_seconds=1, group=None, target=None, name="LiveThread",
args=(), kwargs={}, verbose=None, clean_up=None):
threading.Thread.__init__(self, group=group, target=target, name=name,
args=args, kwargs=kwargs, verbose=verbose)
self._function_to_quit_the_process = function_to_quit_the_process
View gist:616320
Hey, so I have a question about javascript closures and node if anyone is interested.. So I am looping through a list of site objects. These site objects have the url of the site I want to GET and a string that I want to search for in the response. So I am using http.createClient. I then create a request with request = httpClient.request. So i setup my first listener on the request for 'response' which will call my callback and provide me with a response object. I then setup a another listener on this response object to catch the data as it comes in.
So basically my problem is that I need to access attributes from the right site object that i am iterating through when the data callback occurs.
So far I am doing something like below:
So with what I have I can grab just as much of the response as I need but now i need to parse out the actual string I want and the keywords I use to parse this string out is in results[i].start and results[i].end which are not visible to the callbacks receiving the response..