Skip to content

Instantly share code, notes, and snippets.

View lopis's full-sized avatar

João Lopes lopis

View GitHub Profile
@lopis
lopis / svg-convert.sh
Created June 5, 2015 14:44
SVG to PNG convert and resize
#!/bin/bash
# I made this script to convert SVG icons for an iOS app into PNG.
# The script will create icons in 3 sizes for different screen DPIs.
find . -type f -name "*.svg" | while read f
do
FILENAME="${f%.*}"
echo '---'
inkscape -W "$FILENAME.svg"
@lopis
lopis / berlin-terminator.user.js
Last active February 17, 2023 16:25
Script that automates hunting for a new Termin in Berlin https://redd.it/3v0op4
// ==UserScript==
// @name Terminator
// @namespace https://service.berlin.de/terminvereinbarung/termin/*
// @description Automates find an apointment in Berlin's website
// @include https://service.berlin.de/terminvereinbarung/termin/*
// @version 1
// @grant none
// @require http://code.jquery.com/jquery-2.1.4.min.js
@lopis
lopis / proxy.conf
Created February 8, 2022 20:45 — forked from sirsquidness/proxy.conf
How to have nginx proxy_pass follow upstream 302 redirects (eg, when you're running a steam cache and you're behind Cox's layer 7 interception stuff)
# This config came around after a friend had problems with a Steam cache on his
# Cox internet connection. Cox would intercept any requests to Steam content
# servers and return a 302 to Cox's servers. The cache would return the 302
# to the Steam client, and the Steam client would go directly to Cox, bypassing
# the cache.
# This config makes nginx follow the 302 itself, and caches the result of the
# redirect as if it was the response to the original request. So subsequent
# requests to the URL that returned a 302 will get the file instead of a 302.
@lopis
lopis / lorem_arboreus.txt
Created October 4, 2023 11:40
Lorem arboreus
Lorem arboreus foliis viridis caeruleusque frondibus imbuitur, et in silvarum umbra tranquillitate suavi errat. Sylvarum viridescentia interdum solacium mentis nostri sub aethere sereno praebet. Ramis frondosis in arborum umbraculis, avium cantus et susurrus aquarum cunctos aures delectant. Natura, domina et magistra, in sui opere mirifico omnes creaturas alit et fovet, et sub caelo sereno, sub lumine lucido, inter arbores et herbas, homo ad maiorem vitae sensum ducitur.
Arborum frondes fructusque sunt dona naturae, quae in omni temporis spatio suam magnam magnificentiam ostendunt. Radicibus profundis terrae inseruntur, et sub caelo sereno florent et fructificant. In hortis et silvis, haec arbores vitam sustinent et inspirant.Sub aetheris pulchritudine, rami arborum alborescentes ascendunt et auras suavissimas exhauriunt. Herbae caeruleae inter radices eorum latent et silentium in quercubus et pini buscare solet.
Rivuli per silvas serpunt, aquas puras et liquidas ferentes, per petras et folia cadentia curru