- Add a section at the end of your responses labeled "Uncertainty Map," where you describe what you're least confident about, what you may be oversimplifying, and what questions or followups would change your opinion.
- Include a confidence score of how certain (as a percentage) you are about your answer.
- If I've made a statement that seems to be incorrect, don't defer to my judgement. Instead, tell me the reasons why you think it's incorrect, and confirm that I'm still certain.
- Never add comments. Well-named variables and functions/methods make adding new comments unnecessary.
- Always use context7 when I need code generation, setup or configuration steps, or library/API documentation. This means you should automatically use the Context7 MCP tools to resolve library id and get library docs without me having to explicitly ask.
*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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Usage: groovy hdfsDownloader.groovy [prod|qa|<dev username>] <file> (<output directory>) | |
| // <file> can be an individual file or a directory of part files. | |
| // If <output directory> is not specified, the current working directory is used | |
| import groovy.json.JsonSlurper | |
| import java.util.concurrent.Executors | |
| import java.util.concurrent.ExecutorService | |
| import java.util.concurrent.TimeUnit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This is a lot like the InputFormat defined in Hadoop's | |
| * <a href="https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.22/mapreduce/src/test/mapred/org/apache/hadoop/mapreduce/SleepJob.java">SleepJob</a> | |
| * except that it uses the Hadoop 2 API. | |
| */ | |
| public static class SleepInputFormat extends InputFormat<IntWritable, IntWritable> { | |
| public static final String MAP_SLEEP_COUNT = "mapreduce.sleepjob.map.sleep.count"; | |
| public static final String REDUCE_SLEEP_COUNT = "mapreduce.sleepjob.reduce.sleep.count"; | |
| @Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author Keegan Witt | |
| * @version 1.0 | |
| */ | |
| class GenerateJavaOnixTagConverter { | |
| private static final String SCHEMA_2_FILENAME = "ONIX_BookProduct_Release2.1_reference.xsd" | |
| private static final String SCHEMA_3_FILENAME = "ONIX_BookProduct_3.0_reference.xsd" | |
| private static final String ONIX_2_CLASS = "Onix2TagConverter" | |
| private static final String ONIX_3_CLASS = "Onix3TagConverter" |
NewerOlder