Skip to content

Instantly share code, notes, and snippets.

View seanjensengrey's full-sized avatar

Sean Jensen-Grey seanjensengrey

View GitHub Profile

Mesos

MD5 (mesos-1.0.1.tar.gz) = 1aaca00a0ffb20f4b31c2dcc2447c2c5
$ cloc .
    1249 text files.
    1240 unique files.                                          
Eshell V5.10.3 (abort with ^G)
(riak@127.0.0.1)1> {ok, R} = riak_core_ring_manager:get_my_ring().
{ok,{chstate_v2,'riak@127.0.0.1',
[{'riak@127.0.0.1',{245,63641600157}}],
{64,
[{0,'riak@127.0.0.1'},
{22835963083295358096932575511191922182123945984,
'riak@127.0.0.1'},
{45671926166590716193865151022383844364247891968,
'riak@127.0.0.1'},
extern crate fnv;
extern crate glob;
#[macro_use]
extern crate arrayref;
use std::io::prelude::*;
use std::fs::File;
use std::collections::HashSet;
use glob::glob;
@seanjensengrey
seanjensengrey / find_open_dns.py
Last active September 9, 2016 20:17
find all non-private IP addr in a text file and query it for DNS
import ipaddress
import re
import sys
from multiprocessing.pool import ThreadPool
try:
import dns.resolver
from dns.exception import Timeout
except ImportError as e:
import riak
import random
from pprint import pprint
def rand_str(n=10):
return ''.join(chr(random.randrange(ord('a'),ord('z')+1)) for _ in range(n))
client = riak.RiakClient()
assert client.ping() == True
import riak
import time
import random
from IPython import embed
from pprint import pprint
__doc__ = """
import os
import os.path
import hashlib
import itertools
import signal
import select
count = 0
@seanjensengrey
seanjensengrey / install_basho_otp_kerl.md
Last active July 3, 2019 17:52
Installing the Basho Maintained Erlang with Kerl

How to install Basho Erlang using Kerl.

note: Instructions for other platforms are available in the Erlang docs

install kerl

curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod +x kerl
@seanjensengrey
seanjensengrey / centos_7_kerl.md
Created August 3, 2016 18:32
centos erlang build using kerl
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod +x kerl

sudo yum install gcc gcc-c++ glibc-devel make ncurses-devel openssl-devel autoconf java-1.8.0-openjdk-devel git
sudo yum install pam-devel
sudo yum install perl-Digest-SHA-5.85-3.el7.x86_64


CFLAGS="-DOPENSSL_NO_EC=1" ./kerl build git https://github.com/basho/otp OTP_R16B02_basho10 R16B02-basho10
@seanjensengrey
seanjensengrey / Dockerfile
Created July 25, 2016 16:06
Dockerfile for tornado service running on `riak-mesos` cluster
FROM python:3
MAINTAINER demo "demo@example.com"
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update && apt-get install jq nano-tiny
RUN pip install -U pip setuptools && \
pip install virtualenv
RUN useradd -ms /bin/bash worker