Skip to content

Instantly share code, notes, and snippets.

View hanssens's full-sized avatar

Juliën Hanssens hanssens

View GitHub Profile
@hanssens
hanssens / AuthyToOtherAuthenticator.md
Created October 13, 2023 08:31 — 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

@hanssens
hanssens / AuthyToOtherAuthenticator.md
Created October 13, 2023 08:31 — 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

@hanssens
hanssens / LocalDB Reset
Created March 25, 2014 10:02
Reset SQL's LocalDB, after corrupt rights or other problems.
# After problems with a company-wide ActiveDirectory shaker, all (local) SQL Server instances were FUBAR.
# This 'resets' the LocalDB sql instance.
sqllocaldb stop "v11.0" -k
sqllocaldb delete "v11.0"
sqllocaldb create "v11.0"
sqllocaldb start "v11.0"
@hanssens
hanssens / SQL-To-DataTable.cs
Created January 16, 2012 09:19
[C#] SQL Query to Databable to CSV
// Simple example for
// 1.) Read a sql server query to datatable;
// 2.) Export it to .csv
class Program
{
static void Main(string[] args)
{
var connectionString = @"data source=bla bla bla";
var selectQuery = "select * from my-table;";
@hanssens
hanssens / delete_by_segmentby.sql
Created November 14, 2022 10:27 — forked from xvaara/delete_by_segmentby.sql
timescaledb delete from compressed hypertable with segmentby
CREATE OR REPLACE FUNCTION delete_segmentby(_tbl regclass, _col varchar, _id anyelement, OUT result integer)
LANGUAGE plpgsql AS
$$
DECLARE
_schema varchar := (SELECT nspname
FROM pg_catalog.pg_class AS c
JOIN pg_catalog.pg_namespace AS ns
ON c.relnamespace = ns.oid
WHERE c.oid = _tbl);
_table_name varchar := (
@hanssens
hanssens / show-hidden-files-osx.txt
Last active April 22, 2022 00:53
Show all system files, incl. .gitignore, in OSX.
Show all hidden files
> defaults write com.apple.finder AppleShowAllFiles TRUE
Hide all hidden files
> defaults write com.apple.finder AppleShowAllFiles FALSE
In both actions, Finder needs to be restarted through:
> killall Finder
@hanssens
hanssens / SearchAllTables.sql
Created June 25, 2014 07:46
T-SQL Stored Procedure to search all columns of all tables for a given search string
CREATE PROC SearchAllTables
(
@SearchStr nvarchar(100)
)
AS
BEGIN
-- Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved.
-- Purpose: To search all columns of all tables for a given search string
-- Written by: Narayana Vyas Kondreddi
@hanssens
hanssens / app.html
Created January 26, 2017 22:24
Aurelia GistRun script, Javascript flavoured
<template>
<h3>${message}</h3>
</template>
@hanssens
hanssens / Pluralizer.cs
Created May 30, 2012 12:30
[C#] Pluralizer
/* **********************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This source code is subject to terms and conditions of the Microsoft Permissive
* License (MS-PL). A copy of the license can be found in the license.htm file
* included in this distribution.
*
* You must not remove this notice, or any other, from this software.
*
@hanssens
hanssens / read-local-file-or-fetch-from-remote.js
Created September 4, 2014 12:41
Cordova/Phonegap - Reads a (json) file from the local cache and fetches it from a remote url if it doesn't exist yet
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0