Skip to content

Instantly share code, notes, and snippets.

View pgaertig's full-sized avatar

Piotr Gaertig pgaertig

View GitHub Profile
@renjieliu
renjieliu / Migrate Termux setup from Device A to Device B.md
Last active December 18, 2024 20:44
Migrate Termux setup from Device A to Device B

Follow below steps to migrate the setup of Termux from Device A to Device B

Step 0. To get the MicroSD card ID

For termux, ~/storage folder contains a bunch of the soft links

external-n is the one pointing to the MicroSD card or the OTG USB Drive, using realpath ~/storage/external-1, can get the physical path on the MicroSD card. The XXXX-YYYY part is the MicroSD card UUID

Other links, such as dcim, movies, music, they are pointing to the folders on the phone internal storage, using realpath ~/storage/dcim can find the physical location of the folder

@hipertracker
hipertracker / create_lxd.yml
Last active November 7, 2017 19:30
Ansible - create LXD containers
- hosts: localhost
connection: local
tasks:
- name: Create started inventory containers
lxd_container:
name: "{{ item }}"
state: started
source:
type: image
@hipertracker
hipertracker / FilterBar.elm
Last active September 27, 2017 08:52
Elm composition example
module FilterBar exposing (..)
import Html exposing (..)
import Html.Attributes exposing (alt, class, href, id, src, style)
import Html.Attributes.Aria exposing (ariaHidden, role)
import Html.Events exposing (onClick)
---- PROGRAM ----
@hipertracker
hipertracker / ShiftYears.elm
Last active September 21, 2017 10:51
Elm unit testing
module ShiftYears exposing (Msg(ShiftLeft, ShiftRight), shiftYears)
type alias Year =
String
noYear : Year
noYear =
""
@hackerb9
hackerb9 / extract_cookies.sh
Last active November 19, 2024 06:45 — forked from spk/extract_cookies.sh
Extract cookies.sqlite to cookies.txt for use in wget or curl.
#!/bin/bash -e
# extract_cookies.sh:
#
# Convert from Firefox's cookies.sqlite format to Netscape cookies,
# which can then be used by wget and curl. (Why don't wget and curl
# just use libsqlite if it's installed?)
# USAGE:
#
# $ extract_cookies.sh > /tmp/cookies.txt
@hackerb9
hackerb9 / sixcat
Created June 3, 2017 03:36
sixcat: Like 'cat' but show images directly in the terminal using SIXEL graphics
#!/bin/bash
# sixcat: Use sixel graphics to show an image inside a terminal.
# sixgif: Use sixel graphics to play an animation inside a terminal.
# Version 1.0
# hackerb9, June 2017
# Sixel graphics are supported by terminals such as the DEC VT340 and
# emulators, such as 'xterm -ti vt340'.
@nicholasknight
nicholasknight / adv2notes.md
Last active March 25, 2025 16:12
Kinesis Advantage 2 notes

(NOTE: Current and future versions of this and any other Advantage 2-related things I post will be at https://github.com/nicholasknight/adv2keyboard)

I received my Advantage 2 today. There's no full manual yet, even though keyboards are apparently arriving (hint, hint, Kinesis). The quick start guide leaves out the "power user mode", and there are some other quirks.

Update: A manual has been posted at http://www.kinesis-ergo.com/advantage2-resources/

It includes a dictionary for the key maps, but I know it leaves at least one possible key undocumented: it does not list f14, but I have successfully mapped my scrollock to f14 regardless.

It also mentions a firmware version (1.0.18) that doesn't seem to be available yet, with a new feature (status report playback speed).

@phumpal
phumpal / README.md
Last active January 27, 2020 15:09
Install CoreOS on Hetzner w/hardware RAID1

CoreOS on Hetzner w/hardware RADI1

The existing docs when attempting to install CoreOS on Hetzner are a bit incomplete. This caused a bit of frustration for me so I am putting this doc together in hopes that it will help someone else.

Pre-requisites

After ordering your server you will need to log into the Hetzner server console

Add a public key

@lewisd32
lewisd32 / iptableflip.sh
Created April 15, 2015 18:20
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
@pleasetrythisathome
pleasetrythisathome / nashorn.clj
Last active August 29, 2015 14:10
nashorn cljs rendering
(ns starlab.services.nashorn
(:require [clojure.tools.logging :as log]
[clojure.java.io :as io])
(:import [javax.script
Invocable
ScriptEngineManager])
(:use [plumbing.core :exclude [update]]))
(defn nashorn-env []
(doto (.getEngineByName (ScriptEngineManager.) "nashorn")