Skip to content

Instantly share code, notes, and snippets.

View n0rdlicht's full-sized avatar

Thorben Westerhuys n0rdlicht

View GitHub Profile
import sys
import subprocess
import tempfile
import urllib
text = sys.stdin.read()
chart_url_template = ('http://chart.apis.google.com/chart?'
'cht=qr&chs=300x300&chl={data}&chld=H|0')
chart_url = chart_url_template.format(data=urllib.quote(text))
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 23, 2024 04:22
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@PadraigK
PadraigK / Widon't
Last active August 29, 2015 13:57
Quick and dirty implementation of Shaun Inman's 'Widont' in Cocoa
// Example:
//
// Widont makes the last space non-breaking
// so you don't end up with one word on its
// own.
//
// Widont makes the last space non-breaking
// so you don't end up with one word on
// its own.
//
// Source for the Accidental Tech Podcast (ATP) T-Shirt:
// http://www.marco.org/2014/04/29/atp-shirts
//
// By Troy Gaul, June 2, 2014.
//
// Based on Obj-C veresion by Marco Arment, April 28, 2014. MIT license.
// https://gist.github.com/marcoarment/2542cd28cb5df0aa97d8
import UIKit
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 23, 2024 19:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@asukakenji
asukakenji / 0-go-os-arch.md
Last active July 18, 2024 06:42
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@tjukanovt
tjukanovt / api_calls.py
Last active July 7, 2021 17:17
Two Python scripts that can be used to create animated route maps to multiple locations
import pandas as pd
import urllib.request
# path to your csv file with the endpoint coordinates
coordinates = pd.read_csv('swe_points.csv')
# graphhopper API call building blocks. Check Graphhopper documentation how to modify these.
urlStart = 'http://localhost:8989/route?'
point = 'point='
urlEnd = '&type=gpx&instructions=false&vehicle=car'
struct RootView: View {
@State private var isHomeShown = true
@State private var selectedContent = "content1"
var body: some View {
ZStack {
ContentView(content: $selectedContent,
isHomeShown: $isHomeShown)
.blur(radius: isHomeShown ? 10 : 0)
.scaleEffect(isHomeShown ? 0.8 : 1)
@isneezy
isneezy / elementaryos.md
Created December 22, 2019 08:37 — forked from Surendrajat/elementaryos.md
elementaryOS | Things To Do After Installing elementary OS Hera(5.1)

First Things First

  • Enable PPA

     sudo apt update
     sudo apt install software-properties-common
  • Install apt-fast

@abbe79
abbe79 / CoronaAmpel.js
Last active January 4, 2021 22:05
corona incidence for Scriptable on iOS
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: traffic-light;
// share-sheet-inputs: file-url, url, plain-text;
async function getLocation(){
let param = args.widgetParameter
if (param != null && param.length > 0) {
const fixedCoordinates = args.widgetParameter.split(",").map(parseFloat)
return { latitude: fixedCoordinates[0], longitude: fixedCoordinates[1], source: "" }
} else {