Skip to content

Instantly share code, notes, and snippets.

View wolfgangmeyers's full-sized avatar

Wolfgang Meyers wolfgangmeyers

  • AiBrush
  • Washington State, USA
View GitHub Profile
@wolfgangmeyers
wolfgangmeyers / client
Last active August 29, 2015 14:17
Computercraft script - client to control turtle
running = true
modem = peripheral.wrap("back")
modem.open(1)
while true do
io.write(">")
command = io.read()
modem.transmit(0, 1, command)
local event, modemSide, senderChannel,
@wolfgangmeyers
wolfgangmeyers / minetest.lua
Created April 2, 2015 03:36
test strip mine script
-- test strip mine script
os.loadAPI("path")
local DEFAULT_HEIGHT = 5
function isOverBedrock()
if turtle.detectDown() then
local itemName = turtle.inspectDown()
local i = string.find(itemName, ":")
itemName = string.sub(itemName, i + 1, string.len(itemName))
def sex(partners):
for p in partners:
assert p is not Nun
@wolfgangmeyers
wolfgangmeyers / gunicorn-killer.sh
Created October 14, 2015 22:51
how to kill a gunicorn
ps aux | grep gunicorn | awk '{print $2}' | xargs kill -9
@wolfgangmeyers
wolfgangmeyers / cachebuster.py
Created February 1, 2016 00:07
Simple python script to add a query string to all css / js files using a unix timestamp to force refresh of static assets.
#!/usr/bin/env python
import time
def cachebust_script_src(line):
src_i = line.find("src=")
begin_src = src_i + 5
end_src = line.find("\"", begin_src)
src_contents = line[begin_src:end_src]
parts = src_contents.split("?")
base_src = parts[0]
@wolfgangmeyers
wolfgangmeyers / BUILD
Last active February 10, 2023 01:39
Eclipse setup script for bazel
java_binary(
name = "annotation_processors_ide",
create_executable = False,
runtime_deps = [
// annotation processor dependencies here
],
)
java_binary(
name = "project_deps",
@wolfgangmeyers
wolfgangmeyers / workstation-rdp-tunnel.sh
Created August 10, 2016 16:18
SSH tunnel templates
# SSH tunnel for RDP access
ssh -i <key> -f -N -L3389:localhost:3389 <user>@<host>
@wolfgangmeyers
wolfgangmeyers / golang-test-count.sh
Created October 21, 2016 20:28
How to count the number of running tests for a go project
go test ./... -v | grep -c RUN
@wolfgangmeyers
wolfgangmeyers / README.md
Last active May 11, 2017 15:27
Sort interface boilerplate for golang in sublime text
@wolfgangmeyers
wolfgangmeyers / gist:9566680d26d8193d2b335ca10a10085a
Created March 23, 2017 13:17
Use sublime text from the command line on linux
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl