Skip to content

Instantly share code, notes, and snippets.

View noeljackson's full-sized avatar

Noël Jackson noeljackson

View GitHub Profile

Moving Authy to 1Password

1Password 5.3 for OSX, 5.2 for iOS, and 4.1.0.538 for Windows support OTP. I've been using Authy for a while now, but the fact is, I haven't really been using 2FA for some time. As mentioned by 1Password in a recent blog post, having the OTP generator and password on the same device is very much not 2FA. It's just an expiring OTP, which can help, but let's not kid ourselves too much.

With that out of the way. One of the things that was interesting to me was moving my OTP out of Authy and into 1Password. I like the control I get with 1Password, but I didn't want to have to reset all my OTP right away, that would suck. So, I got to dissecting the Authy Chrome App to see what I could do.

Run the Authy Chrome app and make sure it's unlocked.

Now, enable Developer mode in Chrome. We'll need this to inspect the background application that stores al

const { Client } = require('pg')
const config = require('./config')
const generateServer = require('./server')
const server = generateServer()
const invokeHandler = (event, context, handler) => {
return new Promise((resolve, reject) => {
const callback = (error, body) => (error ? reject(error) : resolve(body))
handler(event, context, callback)
kubectl edit pvc <name> for each PVC in the StatefulSet, to increase its capacity.
kubectl delete sts --cascade=false <name> to delete the StatefulSet and leave its pods.
kubectl apply -f <name> to recreate the StatefulSet.
kubectl rollout restart sts <name> to restart the pods, one at a time. During restart, the pod's PVC will be resized.
kubectl get pod -w
kubectl get pvc -w
@noeljackson
noeljackson / webpack-all-exports.js
Created August 14, 2019 07:07
Push out all functions from all files in all directories
const req = require.context('.', true, /\.\/[^/]+\/[^/]+\.js$/);
req.keys().forEach(key => {
Object.keys(req(key)).forEach( component => module.exports[component] = req(key)[component]);
});
@noeljackson
noeljackson / offlineLink.js
Created November 20, 2018 07:49 — forked from lachenmayer/offlineLink.js
Sketch of an implementation for a possible apollo-link-offline module with similar behavior to apollo-offline.
@noeljackson
noeljackson / fixperms.sh
Created September 6, 2018 11:27
fixperms.sh
#For directories only do this.
find . -type d -exec chmod 775 {} \;
#For files only do this.
find . -type f -exec chmod 644 {} \;

Keybase proof

I hereby claim:

  • I am noeljackson on github.
  • I am noeljackson (https://keybase.io/noeljackson) on keybase.
  • I have a public key ASCfwVNpJQSxMOwtgpZYZugDTboF7uRZN4dwyANY9PSwbAo

To claim this, I am signing this object:

React.createClass({
// ...
onClicked() {
// Array of debounced click events
this.debouncedClickEvents = this.debouncedClickEvents || [];
// Each click we store a debounce (a future execution scheduled in 250 milliseconds)
const callback = _.debounce(_ => {
// YOUR ON CLICKED CODE
@noeljackson
noeljackson / neo4j-docker-integration-test.sh
Last active October 4, 2017 10:28
Check to make sure Neo4j started properly.
#!/bin/bash
# Swap out docker-compose for docker run if you like.
docker-compose -f docker-compose.yml up -d
docker-compose ps
SECONDS=0; \
end="$((SECONDS+240))"; \
while true; do \
[[ $(docker-compose -f docker-compose.yml logs --tail=5 neo4j|grep "Remote interface available") ]] \
&& echo "Connected successfully to database." && break; \
[[ "${SECONDS}" -ge "${end}" ]] && echo "Can't connect to database.'" && exit 1; \
@noeljackson
noeljackson / cloudflare-purge.sh
Created February 9, 2017 04:23
Pure Cloudflare cache for a domain via the shell
#!/bin/bash
CFKEY=apikeygoeshere
CFUSER=you@example.org
CFDOMAIN=yourdomain.com
CFZONE=$(curl -X GET "https://api.cloudflare.com/client/v4/zones?name=$CFDOMAIN&status=active&page=1&per_page=20&order=status&direction=desc&match=all" \
-H "X-Auth-Email: $CFUSER" \
-H "X-Auth-Key: $CFKEY" \
-H "Content-Type: application/json" \
| grep -Eo '"result\"\:\[\{"id":"([^"]+)"' \