Skip to content

Instantly share code, notes, and snippets.


Joseph Chiocchi yyolk

Block or report user

Report or block yyolk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
m-shibata / cpuinfo.log
Last active Nov 2, 2019
GPD MicroPC with Ubuntu 19.04 and Kernel 5.2.0rc6
View cpuinfo.log
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 122
model name : Intel(R) Celeron(R) N4100 CPU @ 1.10GHz
stepping : 1
microcode : 0x2e
cpu MHz : 2284.228
cache size : 4096 KB
physical id : 0
bonkydog / apocalypse-names.txt
Last active May 21, 2018
Apocalypse World Names
View apocalypse-names.txt
Lord Meg
kylemcdonald / Triplet Loss.ipynb
Last active Jun 13, 2019
Experimenting with triplet loss embeddings.
View Triplet Loss.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mohakshah /
Last active Nov 11, 2019
Builing ZFS on Raspberry Pi 3 running Rasbpian


This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.


  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install dkms zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
platdrag /
Last active Oct 5, 2019
An example generic wrapper for making any iterator / generator thread-safe compatible with python 3
import threading
A generic iterator and generator that takes any iterator and wrap it to make it thread safe.
This method was introducted by Anand Chitipothu in
but was not compatible with python 3. This modified version is now compatible and works both in python 2.8 and 3.0
class threadsafe_iter:
"""Takes an iterator/generator and makes it thread-safe by
serializing call to the `next` method of given iterator/generator.
simoncos /
Last active Oct 17, 2019 — forked from konradko/
Install Golang 1.9 on Raspberry Pi

Install Golang 1.9:

sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile

If already installed old golang with apt-get:

View akka-ws-client.scala
val req = WebSocketRequest(uri = "ws://")
val webSocketFlow = Http().webSocketClientFlow(req)
val messageSource: Source[Message, ActorRef] =
Source.actorRef[TextMessage.Strict](bufferSize = 10,
val messageSink: Sink[Message, NotUsed] =
.map(message => println(s"Received text message: [$message]"))

Count the number of unique characters in a file

# works for linux. There is a variation for MacOS in the link ^
sed 's/\(.\)/\1\n/g' text.txt | sort | uniq -c # sort -nr # uncomment this to sort the list by frequency

Replace a string in all instances of files in a directory

glaszig / mkp2pblocklist
Last active Jan 21, 2019
creates a blocklist for your p2p endeavors
View mkp2pblocklist
#!/usr/bin/env sh
# inspired by
# usage:
# mkp2pblocklist > /tmp/blockp2p.list
# or
# mkp2pblocklist | gzip -9 > /tmp/blockp2p.list.gz
sapessi /
Last active Aug 2, 2019
Continuous deployment of React websites to Amazon S3

Continuous deployment of React websites to Amazon S3

This sample includes a continuous deployment pipiline for websites built with React. We use AWS CodePipeline, CodeBuild, and SAM to deploy the application. To deploy the application to S3 using SAM we use a custom CloudFormation resource.

Files included

  • buildspec.yml: YAML configuration for CodeBuild, this file should be in the root of your code repository
  • configure.js: Script executed in the build step to generate a config.json file for the application, this is used to include values exported by other CloudFormation stacks (separate services of the same application).
  • index.js: Custom CloudFormation resource that publishes the website to an S3 bucket. As you can see from the buildspec and SAM template, this function is located in a s3-deployment-custom-resource sub-folder of the repo
  • app-sam.yaml: Serverless Application model YAML file. This configures the S3 bucket and the cu
You can’t perform that action at this time.