This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SSH tunnel for RDP access | |
ssh -i <key> -f -N -L3389:localhost:3389 <user>@<host> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java_binary( | |
name = "annotation_processors_ide", | |
create_executable = False, | |
runtime_deps = [ | |
// annotation processor dependencies here | |
], | |
) | |
java_binary( | |
name = "project_deps", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps aux | grep gunicorn | awk '{print $2}' | xargs kill -9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sex(partners): | |
for p in partners: | |
assert p is not Nun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- remote listener | |
os.loadAPI("inventory") | |
os.loadAPI("path") | |
running = true | |
-- this should be configurable somehow | |
modem = peripheral.wrap("right") | |
modem.open(0) | |
while running do | |
local event, modemSide, senderChannel, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- gets a list of all items in a turtle's inventory | |
function listItems() | |
local result = {} | |
for i=1,16 do | |
local item = turtle.getItemDetail(i) | |
if item then | |
local itemName = item["name"] | |
local itemCount = turtle.getItemCount(i) | |
result[i] = itemCount .. " " .. itemName | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- navigate through a path | |
function digDown() | |
while not turtle.down() do | |
turtle.digDown() | |
end | |
end | |
function digUp() | |
while not turtle.up() do |