$ delete-gcloud-network.sh ny-vpc1
#!/usr/bin/env bash
##
def format_seconds(seconds): | |
""" | |
Format a decimal number of seconds into the most appropriate unit | |
(ms, μs, ns, ps) with engineering notation exponents (3, 6, 9, 12), | |
truncated to 2 decimal places. | |
Args: | |
seconds (float): Time in seconds | |
Returns: |
package main | |
import ( | |
"crypto/rand" | |
"encoding/base32" | |
"fmt" | |
"log" | |
"github.com/btcsuite/btcutil/base58" | |
"golang.org/x/crypto/blake2b" |
#!/bin/sh | |
# test -f /root/wakeup.sh && exit 0 | |
uci batch <<EOF | |
set system.@system[0].hostname='WR703N' | |
set system.@system[0].conloglevel=8 | |
set system.@system[0].cronloglevel=8 | |
set system.@system[0].timezone=HKT-8 | |
set system.@system[0].zonename='Asia/Hong Kong' |
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
*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.
#!/bin/bash | |
# Copyright (c) 2010 Luis R. Rodriguez <[email protected]> | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
------------------------------------------------------------------------ | |
-- import | |
------------------------------------------------------------------------ | |
-- | |
-- from Stackoverflow https://unix.stackexchange.com/a/698139 | |
-- | |
import XMonad hiding ( (|||) ) -- jump to layout | |
import XMonad.Config.Desktop | |
import qualified XMonad.StackSet as W | |
import System.Exit |
terraform { | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 3.27" | |
} | |
} | |
required_version = "~> 1.0" | |
} |