Skip to content

Instantly share code, notes, and snippets.

View yyolk's full-sized avatar
๐Ÿฏ
๐™ง๐™š๐™˜๐™ช๐™ง๐™จ๐™ž๐™ซ๐™š ๐™ฉ๐™–๐™ช๐™ฉ๐™ค๐™ก๐™ค๐™œ๐™ฎ

Joseph Chiocchi yyolk

๐Ÿฏ
๐™ง๐™š๐™˜๐™ช๐™ง๐™จ๐™ž๐™ซ๐™š ๐™ฉ๐™–๐™ช๐™ฉ๐™ค๐™ก๐™ค๐™œ๐™ฎ
View GitHub Profile
@yyolk
yyolk / seeyouspacecowboy.sh
Created August 6, 2018 04:49
A shell script to display SEE YOU SPACE COWBOY whenever you logout of your terminal!
#!/usr/bin/env bash
# SEE YOU SPACE COWBOY by DANIEL REHN (danielrehn.com)
# Displays a timeless message in your terminal with cosmic color effects
# Usage: add "sh ~/seeyouspacecowboy.sh; sleep 2" to .bash_logout (or similar) in your home directory
# (adjust the sleep variable to display the message for more seconds)
# Cosmic color sequence
@yyolk
yyolk / CapsLockCtrlEscape.ahk
Created August 5, 2018 22:37 — forked from sedm0784/CapsLockCtrlEscape.ahk
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own and Ctrl when used in combination with another key, ร  la Steve Losh. Adapted from one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (Plus contribs from @randy909 & @mmikeww.)
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}
@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