Skip to content

Instantly share code, notes, and snippets.

View coyote240's full-sized avatar
🏴‍☠️

Adam A.G. Shamblin coyote240

🏴‍☠️
View GitHub Profile
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()

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

@coyote240
coyote240 / test-git-clone.yaml
Last active February 16, 2021 16:22
Test Pipeline Run
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: {{ .Release.Name }}-test-git-clone
annotations:
"helm.sh/hook": test
spec:
pipelineSpec:
tasks:
- name: clone
@coyote240
coyote240 / HowToOTGFast.md
Created July 5, 2019 23:41 — forked from gbaman/HowToOTGFast.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

###Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)
More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH is

{
"mode": "patterns",
"proxySettings": [
{
"address": "127.0.0.1",
"port": 8080,
"username": "",
"password": "",
"type": 1,
"title": "127.0.0.1:8080",
@coyote240
coyote240 / ca.md
Created April 16, 2019 15:08 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

Keybase proof

I hereby claim:

  • I am coyote240 on github.
  • I am signal9 (https://keybase.io/signal9) on keybase.
  • I have a public key ASDxhAdSUPJ6ALdZjiIgGS0nG7oVOSdVP9BtPWkC9Rz0Fwo

To claim this, I am signing this object:

@coyote240
coyote240 / hardening_notes.md
Last active August 12, 2017 00:58
Basic Setup and Hardening of a Linux Server

Science Friday - Basic Setup and Hardening of a Linux Server

Prerequisites

  • Install VirtualBox for your platform
  • Download a Debian netinst ISO from Debian

Setting up our machine

Create a host-only network

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too