Skip to content

Instantly share code, notes, and snippets.

@jpmens
jpmens / AuthyToOtherAuthenticator.md
Created January 27, 2023 15:41 — 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

@jpmens
jpmens / json_to_map.go
Created April 19, 2021 09:12 — forked from cuixin/json_to_map.go
json to map[string]interface{} example in golang
package main
import (
"encoding/json"
"fmt"
)
func dumpMap(space string, m map[string]interface{}) {
for k, v := range m {
if mv, ok := v.(map[string]interface{}); ok {
@jpmens
jpmens / dm-toilet-paper.js
Created October 22, 2020 07:04 — forked from marco79cgn/dm-toilet-paper.js
Scriptable iOS widget that shows the amount of toilet paper which is available at your next dm drugstore
let storeId = 177
let param = args.widgetParameter
if (param != null && param.length > 0) {
storeId = param
}
const storeCapacity = await fetchAmountOfPaper()
const storeInfo = await fetchStoreInformation()
const widget = new ListWidget()
await createWidget()
@jpmens
jpmens / Documentation.md
Created July 12, 2020 12:47 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@jpmens
jpmens / ansible_inventory_plugin_example.py
Created May 27, 2020 14:20 — forked from srgvg/ansible_inventory_plugin_example.py
This is a boiler plate example that could be used to write an inventory plugin It shows the use case of retrieving data from a remote API, which might be a slow or costly action, you may want to cache. What needs to be initialized in Ansible to use a cache is shown, too.
# This is a boiler plate example that could be used to write an inventory plugin.
# It shows the use case of retrieving data from a remote API, which might be a
# slow or costly action, you may want to cache.
# What needs to be initialized in Ansible to use a cache is shown, too.
# This example by by Serge van Ginderachter <serge@vanginderachter.be>
# Copyright (c) 2017 Ansible Project
# Copyright (c) 2020 Serge van Ginderachter <serge@vanginderachter.be>
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
@jpmens
jpmens / ssl_validity.sh
Created December 1, 2019 09:44 — forked from antondollmaier/ssl_validity.sh
Get remaining validity days of certificate
#!/bin/bash
export PATH=${PATH}:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin
TIMEOUT=29
RETVAL=
# If called by zabbix, handle some things different
if echo "${BASH_SOURCE}" | grep -q "zabbix" ; then
# get rid of 1st parameter (on Zabbix 1.8x)
# shift 1

'Users hate change'

This week NN Group released a video by Jakob Nielson in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:

  1. Humans naturally resist change
  2. Your change is for the better
  3. Customers should just get used to it and stop complaining

There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.

@jpmens
jpmens / github_backup_gists.sh
Created March 23, 2019 07:46 — forked from mbohun/github_backup_gists.sh
simple and easy github gist backup
#!/usr/bin/env bash
for url in `./githubapi-get.sh $GIST_TOKEN /gists | jq -r '.[]|.git_pull_url'`
do
git clone ${url};
done
@jpmens
jpmens / gist:e4ea94424df16b5268a90c12b7a044df
Created January 16, 2019 14:03 — 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:
@jpmens
jpmens / SimpleTcpRedirector.py
Created October 18, 2018 17:47 — forked from sivachandran/SimpleTcpRedirector.py
A simple TCP redirector in python
#!/usr/bin/env python
import socket
import threading
import select
import sys
terminateAll = False
class ClientThread(threading.Thread):