Skip to content

Instantly share code, notes, and snippets.

View yyolk's full-sized avatar
🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮

Joseph Chiocchi yyolk

🍯
𝙧𝙚𝙘𝙪𝙧𝙨𝙞𝙫𝙚 𝙩𝙖𝙪𝙩𝙤𝙡𝙤𝙜𝙮
View GitHub Profile
@yyolk
yyolk / Threadsafe_iter.py
Created August 4, 2018 01:15 — forked from platdrag/Threadsafe_iter.py
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 http://anandology.com/blog/using-iterators-and-generators/
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.
"""
@yyolk
yyolk / simple-nginx-webdav.sh
Created July 14, 2018 21:45 — forked from dysinger/simple-nginx-webdav.sh
A simple nginx/webdav setup for use with things like mobile-org
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \
@yyolk
yyolk / index.md
Created July 4, 2018 19:19 — forked from alexcasalboni/index.md
Bridge Function between Kinesis Streams and Step Functions

Bridge Function between Kinesis Streams and Step Functions

For each record read from the Kinesis Stream, a StepFunction state machine will be executed asynchronously.

Required Environment Variables

  • region: the AWS region where your StepFunction state machine is defined.
  • stateMachineArn: the ARN of the StepFunction state machine you want to execute.

Notes

@yyolk
yyolk / he-dns-update.sh
Created July 2, 2018 03:20 — forked from joemiller/he-dns-update.sh
script for updating dynamic DNS records on he.net (hurricane electric)
#!/bin/bash
#
# Script for updating DNS records on Hurricane Electirc's DNS system (https://dns.he.net).
#
# The record will be updated with the IP address that originates the request.
#
# Usage
# -----
#
# Create config file `/etc/he-dns-update.conf`:
@yyolk
yyolk / 03-tftpboot.conf
Created April 1, 2018 16:44 — forked from mikerr/03-tftpboot.conf
Add network boot (TFTP) to pihole (dnmasq)
# /etc/dnsmasq.d/03-tftpboot.conf
enable-tftp
tftp-root=/tftpboot
pxe-service=0,"Raspberry Pi Boot"
@yyolk
yyolk / 03-tftpboot.conf
Created April 1, 2018 16:44 — forked from mikerr/03-tftpboot.conf
Add network boot (TFTP) to pihole (dnmasq)
# /etc/dnsmasq.d/03-tftpboot.conf
enable-tftp
tftp-root=/tftpboot
pxe-service=0,"Raspberry Pi Boot"
@yyolk
yyolk / Instructions.md
Created March 24, 2018 19:47 — forked from mohakshah/Instructions.md
Builing ZFS on Raspberry Pi 3 running Rasbpian

Introduction

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.

Steps

  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
@yyolk
yyolk / Instructions.md
Created March 24, 2018 19:47 — forked from mohakshah/Instructions.md
Builing ZFS on Raspberry Pi 3 running Rasbpian

Introduction

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.

Steps

  1. Install the build dependencies.
$ sudo apt-get update
$ sudo apt-get install build-essential autoconf libtool gawk alien fakeroot
$ sudo apt-get install zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev parted lsscsi wget ksh
@yyolk
yyolk / gist:b74660e9b039a69d6623e9d928b80b6c
Created January 15, 2017 23:36 — forked from sunggun-yu/gist:4416430
Install NMON - CentOS 64bit
# Get Root
sudo su
# Download NMON archive
cd /tmp
wget http://nmon.sourceforge.net/docs/MPG_nmon_for_Linux_14a_binaries.zip
# Install unzip if you don't have
yum install unzip
@yyolk
yyolk / install.sh
Last active October 14, 2016 10:54
Install RabbitMQ on Amazon linux, along with Erlang
# Modify /etc/yum.repos.d/epel.repo. Under the section marked [epel], change enabled=0 to enabled=1.
sudo yum install erlang --enablerepo=epel
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.1/rabbitmq-server-3.1.1-1.noarch.rpm
sudo rpm -Uvh rabbitmq-server-3.1.1-1.noarch.rpm
# Enable managament plugin
sudo rabbitmq-plugins enable rabbitmq_management