Skip to content

Instantly share code, notes, and snippets.

View thwaller's full-sized avatar
🏠
Working from space

thwaller thwaller

🏠
Working from space
View GitHub Profile
@thwaller
thwaller / ipfs-server-setup.md
Created July 29, 2022 19:17 — forked from claus/ipfs-server-setup.md
Host Your Site Under Your Domain on IPFS

Host Your Site Under Your Domain on IPFS

This is a step-by-step tutorial for hosting your website under your domain on IPFS, from zero, on a DigitalOcean Ubuntu 16.04.3 x64 Droplet (i am using the $10 variant with 2GB RAM).

Install IPFS

Log in as root.

First, make sure the system is up to date, and install tar and wget:

@thwaller
thwaller / gist:b5d5ef7a6401c6e251df3fe03d7d7cac
Created June 16, 2022 00:41 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@thwaller
thwaller / AuthyToOtherAuthenticator.md
Created June 10, 2022 08:19 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

@thwaller
thwaller / stripiT.rb
Created May 28, 2022 07:12 — forked from riophae/stripiT.rb
Script to strip various iTunes atoms from purchased AAC files via AtomicParsley.
#!/usr/bin/env ruby
# usage: stripiT.rb
# the original files will be OVERWRITTEN.
# Script to remove extraneous/unwanted atoms from iTunes purchased files by way of AtomicParsley.
# Output should be comparable to the atoms left over after reencoding the file in iTunes itself.
# I only care about songs, so I have no clue how well this applies to video files
# Some information taken from: https://code.google.com/p/mp4v2/wiki/iTunesMetadata
@thwaller
thwaller / obsidian-web-clipper.js
Created January 30, 2022 23:12 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@thwaller
thwaller / revert-a-commit.md
Created January 26, 2022 06:22 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@thwaller
thwaller / eac_log_to_musicbrainz_discid.py
Created January 25, 2022 21:45 — forked from kolen/eac_log_to_musicbrainz_discid.py
Reads EAC log, generates musicbrainz disc TOC listing for use as discid. Opens browser with discid query on musicbrainz.org.
#!/usr/bin/python
"""
Reads EAC log, generates musicbrainz disc TOC listing for use as discid.
Opens browser with discid query on musicbrainz.org.
Warning: may work wrong for discs having data tracks. May generate wrong results on other non-standard cases.
MIT License
Copyright (c) 2018 Konstantin Mochalov
@thwaller
thwaller / dupes.pl
Created January 25, 2022 18:19 — forked from peplin/dupes.pl
Perl script to find duplicate filenames
#!/usr/bin/perl -w
use File::Find;
my %files;
my @dirs;
foreach $argnum (0 .. $#ARGV) {
push(@dirs, $ARGV[$argnum]);
}
@thwaller
thwaller / how-to-git-patch-diff.md
Created November 6, 2021 11:06 — forked from nepsilon/how-to-git-patch-diff.md
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff > some-changes.patch