Skip to content

Instantly share code, notes, and snippets.

View j-bennet's full-sized avatar

Irina Truong j-bennet

View GitHub Profile
@j-bennet
j-bennet / hterm_solarized.js
Last active September 13, 2023 15:27 — forked from jefferymiller/hterm_solarized.js
Chrome/Chromium OS hterm and Secure Shell solarized color scheme.
// Run in the JavaScript console of the hterm browser window
var colorPaletteOverides = [
"#073642", /* 0: black */
"#dc322f", /* 1: red */
"#859900", /* 2: green */
"#b58900", /* 3: yellow */
"#268bd2", /* 4: blue */
"#d33682", /* 5: magenta */
"#2aa198", /* 6: cyan */
"#eee8d5", /* 7: white */

Keybase proof

I hereby claim:

  • I am j-bennet on github.
  • I am jbennet (https://keybase.io/jbennet) on keybase.
  • I have a public key ASALD46Ncke1mwflCl2a4LApXLsuHni6xnAjge5HI9wFZQo

To claim this, I am signing this object:

@j-bennet
j-bennet / aggregate_dataframe.py
Created September 15, 2017 22:25
[Simple timestamp aggregation in Spark] #spark
import datetime as dt
from pyspark.sql.types import *
from context import initialize
MY_SCHEMA = StructType([
StructField('ts', TimestampType(), True),
])
@j-bennet
j-bennet / docker-compose.yml
Created April 10, 2017 22:50 — forked from yoanisgil/docker-compose.yml
Elastic Search - Docker Compose
master:
image: elasticsearch:2
ports:
- "9200:9200"
restart: always
container_name: es_master
es-node:
image: elasticsearch:2
command: elasticsearch --discovery.zen.ping.unicast.hosts=es_master
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names
@j-bennet
j-bennet / get_urls.py
Last active October 25, 2016 23:21 — forked from msukmanowsky/get_urls.txt
Download list of crawl urls and write to file "urls.txt"
#!/usr/bin/env python
'''Build up a set of URLs using the common crawl index. See
http://commoncrawl.org/2015/04/announcing-the-common-crawl-index/ for more info.
'''
from __future__ import print_function
import gzip
import logging
import os
import random
@j-bennet
j-bennet / tweet-with-url-in-params.json
Last active March 29, 2016 21:44
Tweet that won't be found by clean_url
{
"_index": "tweets",
"_type": "tweet",
"_id": "tag:search.twitter.com,2005:685571395556802560",
"_score": 1,
"_source": {
"body": "How Facebook Makes Us Dumber https://t.co/hlM2IrpL0g #facebook #social",
"info": {
"klout_score": 47,
"matching_rules": [
@j-bennet
j-bennet / huge-select-stmt.sql
Last active March 29, 2016 21:45
Large multiline query
select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
union all select (1, 2, 3, 4, 5, 6,