Skip to content

Instantly share code, notes, and snippets.

View thstarshine's full-sized avatar
🏔️

starshine thstarshine

🏔️
  • Taipei, Taiwan
View GitHub Profile
@thstarshine
thstarshine / AuthyToOtherAuthenticator.md
Created February 14, 2024 10:00 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


*update: This might affect how easy it is to use this technique past August 2024: https://www.theverge.com/2024/1/8/24030477/authy-desktop-app-shutting-down


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.

@thstarshine
thstarshine / .gitlab-ci.yml
Created September 5, 2022 23:44
ci test file
image: node:16
cache:
key: "$CI_PROJECT_ID"
paths:
- node_modules/
before_script:
- npm set progress=false
@thstarshine
thstarshine / Dockerfile
Created November 25, 2021 06:48 — forked from majodev/Dockerfile
netdata daemonset on kubernetes
FROM netdata/netdata:latest
MAINTAINER YOUR_EMAIL
# add netdata user to root group (access volumne mounts from host)
RUN apk --no-cache add shadow
RUN usermod -a -G root netdata
ENTRYPOINT ["/usr/sbin/run.sh"]
@thstarshine
thstarshine / pritunl-server-custom-ssl_manually
Created June 27, 2021 04:22 — forked from phiberoptick/pritunl-server-custom-ssl_manually
Use custom SSL cert in Pritunl Server Community
Ignore all that craziness below. These can be set from the cli with the "pritunl" command.
The commands below can be used to get/set the values of the cert, key, port and if the :80 -> "app.server_port" redirect is active.
# Get current SSL server cert:
pritunl get app.server_cert
# Get current SSL server key:
pritunl get app.server_key
@thstarshine
thstarshine / pritunl_mongo_audit_query.py
Last active September 6, 2021 08:04 — forked from jonathanhle/pritunl_mongo_audit_query.py
pritunl mongodb query for user info
# https://gist.github.com/jonathanhle/4bb44d2e5d3ace8a62928ec2cb3e39a7
# Requires pymongo 3.6.0+
from datetime import datetime, timedelta
from pymongo import MongoClient
from bson.tz_util import FixedOffset
from bson.son import SON
from collections import OrderedDict
# Setup logger
import logging
@thstarshine
thstarshine / locustfile.py
Created June 30, 2020 02:44 — forked from yamionp/locustfile.py
Websocket Locust Sample. locustfile and Echo/Chat Server
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import json
import uuid
import time
import gevent
@thstarshine
thstarshine / TdccBig5.cs
Created June 14, 2020 07:02
集保罕字 Big5 轉 Unicode
using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Globalization;
namespace TdccBig5
{
public static class TdccBig5ToUnicode
{
"openapi" : "3.0.0",
"info" : {
"title" : "Taiwan Stock Market Real-time Quotes API",
"description" : "### 相關說明:\n* 所有日期格式(date, time)皆以 ISO 8601 格式傳輸及實作 \n* 回傳格式參照 google json guide \n* 所有 Success Response 包含 apiVersion, { data: { info: {}}} \n* 所有 Error Response property code 同 http status code \n* 所有 Error Response Format 相同\n",
"contact" : {
"email" : "development@fugle.tw"
},
"license" : {
"name" : "Apache 2.0",
@thstarshine
thstarshine / stock.json
Last active December 4, 2020 05:27
stock.json
{
"openapi": "3.0.0",
"info": {
"description": "### 相關說明:\n* 日期時間格式為GMT+0",
"version": "0.1.0",
"title": "Taiwan Stock OHLC Data API",
"contact": {
"email": "development@fugle.tw"
},
"license": {
@thstarshine
thstarshine / test.sh
Last active June 26, 2019 01:37
shell script exec string command
#!/bin/bash
# /tmp/cmd = -l
a='$(cat /tmp/cmd)'
echo "ls $a" # => ls $(cat /tmp/cmd)
# alternatives to:
#eval ls $a