Skip to content

Instantly share code, notes, and snippets.

View 2grep's full-sized avatar

Niels Olson 2grep

View GitHub Profile
@2grep
2grep / keybase.md
Created February 10, 2017 05:23
keybase.md

Keybase proof

I hereby claim:

  • I am 2grep on github.
  • I am nielsolson (https://keybase.io/nielsolson) on keybase.
  • I have a public key ASAs9_qelQLj-MVP3G_c-ArZ0RsvYY2QP4CSZL1P9wULAAo

To claim this, I am signing this object:

@2grep
2grep / bash
Last active September 27, 2015 20:14
iscsi setup
# zpool status
pool: tank
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@2grep
2grep / lcs.py
Last active August 29, 2015 14:22 — forked from istepanov/lcs.py
#!/usr/bin/env python
# -*- coding: utf-8
"""
Search longest common substrings using generalized suffix trees built with Ukkonen's algorithm
Author: Ilya Stepanov <code at ilyastepanov.com>
(c) 2013
@2grep
2grep / CommenOnTSA_AIT_Rule_2012-0004-0001
Created April 22, 2013 16:20
regulations.gov comment on TSA-2013-0004-0001
As a military physician who majored in Physics, and was deployed in support of Operation Tomadachi, and thus reviewed the literature on population exposure to radiation, who prior to my medical training, served as an anti-terrorism officer on a nuclear aircraft carrier, before during, and after 9/11, I am very concerned about this rule for economic, medical, and security reasons. - -
In a time when we are sequestering funds, when air traffic controllers are being taken off duty, this bloated pig of an agency is asking for yet more billions without divulging a shred of evidence to the public that these machines have caught any terrorists. The opportunity cost of this spending is enormous. The Boston Marathon bombers could have been caught by a better funded FBI, every school child could have a free lunch. - -
In a time of an aging population, suffering from waning immune surveillance, this bloated pig of an agency is generating fear to justify their billions by irradiating citizens, particularly those most
@2grep
2grep / GnomesVsScripts
Created April 10, 2013 05:19
Newb python question, maybe a general programming question?
I have been struggling to understand programming since I was, oh, 9, and couldn't get beyond drawing a spaceman helmet in Logo (using an octogon and a square). Part of the problem is perhaps that I have received essentially nil formal education on this.
I have been thinking of functions as a recipe. In my world, the program is a recipe box and some of the recipes (functions) call for other recipes. The processor starts executing the master recipe by writing the instructions into RAM and working through them. Like, breakfast crepes. You call the breakfast crepes recipe from Julia Childs. You have to do make the crepe batter once. Then, while you still have crepe batter, you iteratively make crepes. Concurrently, there are various fruit preparations you can make.
I understand recursion is the idea of writing the function calling itself. But, really, the processor is rewriting the function, nested over and over. And perhaps building trees as the copies of the function get nested further and various tests are m