Skip to content

Instantly share code, notes, and snippets.


Tyler Cipriani thcipriani

View GitHub Profile
montehurd /
Last active May 14, 2021
Super easy method for experimenting with matplotlib graphs - with a bunch of examples. Approach used below is for purpose of quick prototyping (configure graphs, convert output to base64 encoded html tags, send html directly to browser). Script is easily modified and can run by pasting its text into a Terminal window. Tested on macOS.
read -r -d '' PYTHON_SCRIPT << --END
import base64
import cStringIO
from matplotlib import animation
from tempfile import NamedTemporaryFile
import matplotlib.pyplot as plt
import numpy as np
gertvdijk /
Created Jul 27, 2018
Init and start Gerrit in a single shell script example
#!/bin/sh -ex
# Because Gerrit's "daemon --init" can't take init options we will do this
# separately. Feature request filed:
# Init site (provision). Note that the GERRIT_WAR may be a different version
prasanthj / lirc-pi3.txt
Last active Apr 21, 2022
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
View lirc-pi3.txt
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
seanmhanson /
Created Apr 3, 2017
Ableist Language in Code: Sanity Check

Ableist Language in Code: Sanity Check

Removing ableist language in code is important; it helps to create and maintain an environment that welcomes all developers of all backgrounds, while emphasizing that we as developers select the most articulate, precise, descriptive language we can rather than relying on metaphors. Quite simply, avoiding ableist language lets us make sure we are inclusive of all developers, while moving toward language that is simultaneously more acccessible to developers whose first language might not be our own.

The phrase sanity check is ableist, and unnecessarily references mental health in our code bases. It denotes that people with mental illnesses are inferior, wrong, or incorrect, and the phrase sanity continues to be used by employers and other individuals to discriminate against these people.

There are a ton of alternatives, and one of the best ways to select one is to ask yourself: What am I actually checking? and select something more descriptive. In everyday c

oifland / Jenkinsfile
Last active Jun 21, 2022
Loops in Jenkinsfiles
View Jenkinsfile
// Related to
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
stage('Test 2: loop of sh commands') {
altercation / xmonad.hs
Created Jan 10, 2017
XMonad Config for video bug report re: screenlock obscured by windows after switching displays
View xmonad.hs
{-# LANGUAGE AllowAmbiguousTypes, DeriveDataTypeable, TypeSynonymInstances, MultiParamTypeClasses #-}
-- a little messy, I know, but it's WIP
-- Ethan Schoonover <> @ethanschoonover --
-- --
-- current as of XMonad 0.12
joakin /
Last active Jan 14, 2019
Collapse repeated unread notifications in phabricator
drmalex07 /
Last active Jun 24, 2022
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward


Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

Description=Setup a secure tunnel to %I
robacarp / deep_thought.rb
Last active Feb 15, 2018
Testing ruby mutexs across threads and forks
View deep_thought.rb
# Deep Thought is a computer that was created by the pan-dimensional,
# hyper-intelligent species of beings (whose three-dimensional
# protrusions into our universe are ordinary white mice) to come up
# with the Answer to The Ultimate Question of Life, the Universe,
# and Everything. Deep Thought is the size of a small city.
class Worker
@@mutex =
PurpleBooth /
Last active Jun 26, 2022
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.