Skip to content

Instantly share code, notes, and snippets.

View brianherman's full-sized avatar

brian herman brianherman

  • A Cons Apart
  • Chicago, Illinois
View GitHub Profile
@brianherman
brianherman / cinder.md
Last active May 5, 2021 02:25
Install Facebooks Fast CPython implementation with Docker
View cinder.md
View Install cinder 3.8 with fedora 32
TLDR; This makes pip work.
https://docs.docker.com/engine/install/
Inside your terminal CTRL-R cmd for windows.
CTRL-ALT-F2 -> Login -> receive bash prompt.
```
docker run -t -i fedora:32 bash
```
Inside the docker image
```
git clone https://github.com/facebookincubator/cinder.git
View gist:f777dc076bd589e7ebb9c626e13ab009
var http = require('http');
function follow(url, cb) {
http.get(url, function(res) {
res.on('data', function (chunk) {
var data = JSON.parse(chunk.toString());
if (!data || !data.follow) {
cb(data);
return;
}
View interpolation_search.py
import math
import random
def search(array, key):
if len(array) == 0: return -1
hits = 0
max_value = 4294967296
min_value = 0
lower = 0
upper = len(array) - 1
View list of programming languages
A# .NET
A# (Axiom)
A-0 System
A+
A++
ABAP
ABC
ABC ALGOL
ABSET
ABSYS
@brianherman
brianherman / delete.py
Last active June 4, 2018 22:42
delete github
View delete.py
#pip install pygithub
#python delete.py <username> <token>
#https://github.com/settings/tokens
#Create a token with delete permission and all other repo permission
#https://i.imgur.com/1mrTjTJ.png
import sys
from github import Github
username = sys.argv[1]
token = sys.argv[2]
g = Github(username, token)
View gist:4fd8b9faf2d193777b2f881648961600
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brianherman
brianherman / sawtooth.md
Created December 16, 2017 03:59
sawtooth notes
View sawtooth.md

https://sawtooth.hyperledger.org/docs/core/releases/latest/_autogen/txn_submit_tutorial.html Generally, to compile Python Protobufs you would follow these instructions to install Google’s Protobuf compiler and manually compile Python classes however you like.

This example will use classes from the Sawtooth Python SDK, which can be compiled by running the executable script bin/protogen.

Sawtooth protocol buffers aren't in the pip package so you have to generate them.

View upgrade sentry
how to upgrade sentry
sudo docker rm -f my-sentry
sudo docker -i -t my-sentry /bin/bash(attach to sentry)
while attached run command:
sentry upgrade
re run sentry with secret key
@brianherman
brianherman / jessie-mssql.md
Last active June 15, 2018 19:00
Debian Jessie and mssql-server
View jessie-mssql.md

Download mssql from the microsoft website.

wget https://packages.microsoft.com/ubuntu/16.04/mssql-server/pool/main/m/mssql-server/mssql-server_14.0.1.246-6_amd64.deb

dpkg -i mssql-server_14.0.1.246-6_amd64.deb 

The next command will install dependancies.

sudo apt-get -f install