Skip to content

Instantly share code, notes, and snippets.


Tyler Rockwood rockwotj

View GitHub Profile
fundter /
Created Feb 1, 2019
Turn a non-modular jar into a modular jar (Java module)
# Generate
jdeps --generate-module-info <> <path-to-non-modular-jar>
# Compile the
javac --patch-module <name-of-the-module>=<path-to-non-modular-jar> <>
# Update jar with module-info
cd <directory-containing-module-info.class> # avoid path prefix to module-info for next command
jar uf <path-to-non-modular-jar> module-info.class
DGrady /
Last active Jul 30, 2022
Stream data asynchronously through a subprocess in Python
Problem: provide two-way communication with a subprocess in Python.
See also:
import asyncio
import sys
asciimike / BUILD
Last active Jul 11, 2022
Example of how to reference a CocoaPod in Bazel
name = "App",
hdrs = ["src/*.h"],
srcs = ["src/*.m"],
deps = [
bsilver8192 / BUILD
Created Mar 17, 2016
Basics of generating a compile_commands.json file with Bazel
name = 'generate_compile_command',
srcs = [
deps = [
lopezjurip /
Created Sep 26, 2015
OSX Homebrew: docker-machine setup


Make sure you have installed Homebrew and (Homebrew-Cask)[].

# Install Homebrew
ruby -e "$(curl -fsSL"

# Install Homebrew-cask
brew install caskroom/cask/brew-cask
View gist:e12d731ba01ba58f0006
package services
import java.lang.reflect.Type
import org.joda.time.format.ISODateTimeFormat
import org.joda.time.{DateTime, DateTimeZone}
object Serializers {
soheilhy /
Last active Aug 11, 2022
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

devunwired /
Last active Mar 7, 2022
An optimized implementation of GifDecoder for Android devices.
* Copyright (c) 2013 Xcellent Creations, Inc.
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
jjarmoc / gist:1571540
Created Jan 6, 2012
Quoted Printable encode/decode bash aliases - suitable for pipelining
View gist:1571540
# To decode:
# qp -d string
# To encode:
# qp string
alias qpd='perl -MMIME::QuotedPrint -pe '\''$_=MIME::QuotedPrint::decode($_);'\'''
alias qpe='perl -MMIME::QuotedPrint -pe '\''$_=MIME::QuotedPrint::encode($_);'\'''
function qp {
if [[ "$1" = "-d" ]]