Skip to content

Instantly share code, notes, and snippets.

Avatar

Irina Truong j-bennet

View GitHub Profile
@j-bennet
j-bennet / hterm_solarized.js
Last active Oct 29, 2020 — forked from jefferymiller/hterm_solarized.js
Chrome/Chromium OS hterm and Secure Shell solarized color scheme.
View hterm_solarized.js
// 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 */
View keybase.md

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 Sep 15, 2017
[Simple timestamp aggregation in Spark] #spark
View aggregate_dataframe.py
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 Apr 10, 2017 — forked from yoanisgil/docker-compose.yml
Elastic Search - Docker Compose
View docker-compose.yml
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
View homebrew-install-gnu.sh
# 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 Oct 25, 2016 — forked from msukmanowsky/get_urls.txt
Download list of crawl urls and write to file "urls.txt"
View get_urls.py
#!/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 / .block
Last active Apr 23, 2016
Titanic passengers: survival by class, sex and age
View .block
license: gpl-3.0
height: 1000
@j-bennet
j-bennet / tweet-with-url-in-params.json
Last active Mar 29, 2016
Tweet that won't be found by clean_url
View tweet-with-url-in-params.json
{
"_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 Mar 29, 2016
Large multiline query
View huge-select-stmt.sql
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,