Skip to content

Instantly share code, notes, and snippets.

View outlyer's full-sized avatar

Aubin Paul outlyer

View GitHub Profile
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char ** argv) {
char c = '\0';
int i = 0;
int j = 1;
/* Do not care if no arguments are passed; escaped nothing is still nothing. */
if (argc < 2) {
@outlyer
outlyer / fixencoding.js
Created September 11, 2023 12:30
Fix HTML Entity Encoding
const fixEncoding = s => new TextDecoder().decode(new Uint8Array(s.split('').map(r=>r.charCodeAt())))
console.log(fixEncoding('Além'))
@outlyer
outlyer / AuthyToOtherAuthenticator.md
Created January 6, 2023 16:31 — 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

@outlyer
outlyer / LetsEncrypt_HTTPS_plex.MD
Created March 10, 2019 16:15 — forked from churro-s/LetsEncrypt_HTTPS_plex.MD
Setup Let's Encrypt certificate for use with Plex Media Server on Ubuntu
@outlyer
outlyer / fixunknownaudio.sh
Created March 15, 2018 05:03
Tool to default unknown audio tracks in MKV files to English (therby avoiding unnecessary subtitles)
#!/bin/sh
#
# Requires mkvtoolnix
#
find . -name \*.mkv | while read file
do
mkvinfo "$file" | grep -q 'Language: und'
if [ $? = 0 ]; then
echo $file
mkvpropedit --edit track:v1 --set language=eng --edit track:a1 --set language=eng "$file"
@outlyer
outlyer / fixepubencoding.sh
Created February 17, 2018 15:03
Tool to fix epub encoding for use with devices like the Amazon Kindle which do not handle high UTF characters and require HTML Entities
#!/bin/sh
#
IFS='|'
base=${1%%.*}
ext=${1#*.}
#if [[ $# -eq 0 ]] ; then
if [ "$ext" != "epub" ]; then
echo "Usage: $0 [EPUB FILE]"
@outlyer
outlyer / podpage
Created July 13, 2016 23:14
Go to the homepage of a Cocoapod based on the title
#!/bin/sh
#
# Requires [jq](https://stedolan.github.io/jq/) and support for the `open` command (Mac and Linux AFAIK)
#
page=$(pod spec cat $1 | jq .homepage | sed -e 's/\"//g')
open $page
@outlyer
outlyer / pushover.py
Created May 28, 2016 17:16
Pushover Post Script for NZBGet
#!/usr/bin/env python
##############################################################################
### NZBGET POST-PROCESSING SCRIPT ###
# Send Pushover notification.
#
# This script sends a Pushover notification when the job is finished.
#
# NOTE: This script requires Python to be installed on your system.
##############################################################################
@outlyer
outlyer / SassMeister-input.scss
Created May 10, 2016 12:23
Precise control over responsive typography for Sass
// ----
// libsass (v3.3.2)
// ----
// =========================================================================
//
// PRECISE CONTROL OVER RESPONSIVE TYPOGRAPHY FOR SASS
// ---------------------------------------------------
// Indrek Paas @indrekpaas
//
@outlyer
outlyer / fix_american_dad_sickbeard.diff
Created February 26, 2015 16:05
A (hacky) Fix for American Dad! series confusion between TVDB and SickBeard
diff --git a/lib/tvdb_api/tvdb_api.py b/lib/tvdb_api/tvdb_api.py
index 0970288..b45d619 100644
--- a/lib/tvdb_api/tvdb_api.py
+++ b/lib/tvdb_api/tvdb_api.py
@@ -834,6 +834,14 @@ class Tvdb:
seas_no = int(float(elem_seasnum.text))
ep_no = int(float(elem_epno.text))
+ # Fixes American Dad! issue from TVDB
+ if sid == 73141: