Skip to content

Instantly share code, notes, and snippets.

View curreta's full-sized avatar
📷
Focused

Carlos Urreta curreta

📷
Focused
View GitHub Profile
import sys
import re
from anytree import Node, RenderTree
MAX_NODES = 500
def parse_tree_output(lines):
root = Node("root")
stack = [root]
prev_indent = -1
{
"keywords": [
{
"name": "lens",
"url": "macrorails.com/lens",
"category": "Camera Brand"
},
{
"name": "Nikon",
"url": "macrorails.com/nikon",
@curreta
curreta / twitch-videoad.js
Last active November 6, 2020 05:25
twitch-videoad.js
/// twitch-videoad.js
const origFetch = window.fetch;
window.fetch = (url, init, ...args) => {
if (typeof url === "string") {
if (url.includes("/access_token")) {
url = url.replace("player_type=site", "player_type=site");
} else if (
url.includes("/gql") &&
init &&
typeof init.body === "string" &&
@curreta
curreta / bikesdirect.sh
Created April 24, 2014 05:57
Bikes Direct Downloader
#!/bin/bash
##download to disk
##wget -r -l 1 http://www.bikesdirect.com/products/road_bikes.htm
echo "<html><body>"
for sz in $(seq 49 64);
do
echo "<a href="size/${sz}/avail.txt">Size $sz:</a><br/>"
mkdir -p size/$sz;