Skip to content

Instantly share code, notes, and snippets.

@jpmens
jpmens / MANIFEST.in
Last active February 24, 2024 20:15 — forked from karlp/MANIFEST.in
Including git version in setup.py files. (Requires at least _one_ tag in the repo) Normally used to make things like, "python setup.py sdist" give you a predictable name for files. Normally used with tags on the repo like 0.1 or 2.3.0 You should add RELEASE-VERSION to MANIFEST.in so that end users of the tarball can use this too.
include RELEASE-VERSION
include version.py
# Anything else you normally use
@jpmens
jpmens / wemos_mhz14.ino
Created April 8, 2016 10:26 — forked from bembu/wemos_mhz14.ino
Wemos D1 Mini + MH-Z14 + SoftwareSerial
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <SoftwareSerial.h>
#include <Ticker.h>
const char* ssid = "Bembun";
const char* password = "ananasakaama";
@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 / a.txt
Created November 7, 2012 18:56 — forked from anonymous/a.txt
version.bind of public DNS resolvers
" Why query me?Your IP had been logged!"
" unknown "
"( prasina aloga )"
"( surely you must be joking :) )"
"(get out - secure)"
"-"
"-=[NiN]=-"
"."
"... baubau :)"
"..:: blink-bind ::.."
@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 / 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 / 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 / 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: