Skip to content

Instantly share code, notes, and snippets.

@keeganwitt
keeganwitt / hdfs-username-hack.user.js
Created October 3, 2013 14:42
A userscript to override the username to allow you to view HDFS files and directories from the NameNode web interface that aren't world readable
// ==UserScript==
// @name hdfs-username-hack
// @version 0.1
// @description Overrides the username to allow you to view HDFS files and directories from the NameNode web interface that aren't world readable
// @author Keegan Witt
// @include */browseDirectory.jsp*
// @include */browseBlock.jsp*
// ==/UserScript==
// a function that loads jQuery and calls a callback function when jQuery has finished loading
@keeganwitt
keeganwitt / dependency-report.gradle
Created January 31, 2018 19:58 — forked from tzachz/dependency-report.gradle
Gradle: multi-project dependency graph (supports depth > 2)
// Inspired by https://gist.github.com/abesto/cdcdd38263eacf1cbb51
// Task creates a .dot file with all inter-module dependencies
// Supports any depth of nested modules
task moduleDependencyReport {
doLast {
def file = new File("project-dependencies.dot")
file.delete()
file << "digraph {\n"
file << "splines=ortho\n"
@keeganwitt
keeganwitt / gradle-dependency-analyze.gradle
Created January 31, 2018 19:58 — forked from kellyrob99/gradle-dependency-analyze.gradle
A simple Gradle wrapper for the maven dependency:analyze goal
import org.apache.maven.shared.dependency.analyzer.ClassAnalyzer
import org.apache.maven.shared.dependency.analyzer.DefaultClassAnalyzer
import org.apache.maven.shared.dependency.analyzer.DependencyAnalyzer
import org.apache.maven.shared.dependency.analyzer.ProjectDependencyAnalysis
import org.apache.maven.shared.dependency.analyzer.asm.ASMDependencyAnalyzer
import org.gradle.api.Project
import org.gradle.api.artifacts.ConfigurationContainer
import org.gradle.api.artifacts.ResolvedArtifact
import org.gradle.api.artifacts.ResolvedDependency
@keeganwitt
keeganwitt / pom.xml
Last active February 1, 2022 01:26
Groovyc via Maven AntRun Example
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovyc-antrun-example</artifactId>
<name>Groovyc Maven AntRun Example</name>
<version>1.0-SNAPSHOT</version>
@keeganwitt
keeganwitt / terraform-datadog-dashboard-url-and-id-bug.log
Created October 12, 2022 15:12
Log output showing how running terraform plan changes the Datadog dashboard ID and URL even with no changes
2022-10-12T10:26:05.047-0400 [INFO] Terraform version: 1.2.5
2022-10-12T10:26:05.047-0400 [DEBUG] using github.com/hashicorp/go-tfe v1.0.0
2022-10-12T10:26:05.047-0400 [DEBUG] using github.com/hashicorp/hcl/v2 v2.12.0
2022-10-12T10:26:05.047-0400 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2022-10-12T10:26:05.047-0400 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2022-10-12T10:26:05.047-0400 [DEBUG] using github.com/zclconf/go-cty v1.10.0
2022-10-12T10:26:05.047-0400 [INFO] Go runtime version: go1.18.1
2022-10-12T10:26:05.047-0400 [INFO] CLI args: []string{"/Users/kwitt/.tfenv/versions/1.2.5/terraform", "plan"}
2022-10-12T10:26:05.047-0400 [DEBUG] Attempting to open CLI config file: /Users/kwitt/.terraformrc
2022-10-12T10:26:05.047-0400 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
@keeganwitt
keeganwitt / AuthyToOtherAuthenticator.md
Created February 14, 2024 06:44 — 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.