Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🏄🏻‍♂️

Dan Lynch pyramation

💭
🏄🏻‍♂️
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am pyramation on github.
  • I am danlynch (https://keybase.io/danlynch) on keybase.
  • I have a public key ASCIjdOUoAEE-zUGY85OUzH6ucOaOCtjJQGxZXgVfEjtGQo

To claim this, I am signing this object:

View reserved-words.js
const reserved = [
'all',
'analyse',
'analyze',
'and',
'any',
'array',
'as',
'asc',
'asymmetric',
View AuthyToOtherAuthenticator.md

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

View smart_comments.sql
CREATE OR REPLACE FUNCTION smart_comments(tags jsonb, description text default null)
RETURNS text
AS $$
DECLARE
key text;
value jsonb;
tvalue text;
attrs text[] = ARRAY[]::text[];
_key text;
_value text;
View burning ubuntu iso on mac.md

Format the USB Stick

  • Launch Disk Utility from Applications>Utilities or Spotlight search
  • Insert your USB stick and observe the new device added to Disk Utility
  • Select the USB stick device (you may need to enable the option View>Show All Devices) and select Erase from the tool bar (or right-click menu)
  • Set the format toMS-DOS (FAT) and if the option shows, the scheme to GUID Partition Map
  • Check you’ve chosen the correct device and click Erase

Burning the drive

View units.json
[
{
"Definition": {
"def": "s",
"params": "!",
"comment": "The second, symbol s, is the SI unit of time. It is defined"
}
},
{
"Definition": {
View PgUploadField.js
import { Upload } from 'graphql-upload';
export default function UploadFieldPlugin(
builder,
{ uploadFieldDefinitions }
) {
const findMatchingDefinitions = (def, table, attr) =>
def.match({
schema: table.namespaceName,
table: table.name,
@pyramation
pyramation / keybindings.json
Created Aug 4, 2020
vscode keybindings for terminal
View keybindings.json
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+cmd+left",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "\u001bb" }
},
{
"key": "ctrl+cmd+right",
"command": "workbench.action.terminal.sendSequence",
View add-jobs-with-fields.sql
DROP SCHEMA IF EXISTS my_test_schema CASCADE;
CREATE SCHEMA IF NOT EXISTS my_test_schema;
CREATE FUNCTION my_test_schema.json_build_object_apply (arguments text[])
RETURNS json
AS $$
DECLARE
arg text;
_sql text;
@pyramation
pyramation / deployment.yaml
Created Jul 17, 2020
example of init containers
View deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: my-app
spec:
replicas: 1
template:
metadata:
labels:
app: my-app