Skip to content

Instantly share code, notes, and snippets.

View ianonavy's full-sized avatar

I. A. Naval ianonavy

View GitHub Profile
@ianonavy
ianonavy / demo
Created July 26, 2012 02:45
Localhost Demo
#!/bin/bash
#
# Localhost Demo
#
# Script to create a tunnel on a remote server. Be sure to configure it to use
# your server's SSH information. You can use this script to temporarily showcase
# a local Web server to the Internet. All you need is a domain and a VPS with
# nginx (or similar software) configured to proxy REMOTE_PORT (see
# configurations) to port 80.
#
TF_LOG=DEBUG terraform apply
2022-11-03T10:05:02.664-0400 [INFO] Terraform version: 1.3.3
2022-11-03T10:05:02.664-0400 [DEBUG] using github.com/hashicorp/go-tfe v1.9.0
2022-11-03T10:05:02.664-0400 [DEBUG] using github.com/hashicorp/hcl/v2 v2.14.1
2022-11-03T10:05:02.664-0400 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2022-11-03T10:05:02.664-0400 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734
2022-11-03T10:05:02.664-0400 [DEBUG] using github.com/zclconf/go-cty v1.11.1
2022-11-03T10:05:02.664-0400 [INFO] Go runtime version: go1.19.1
2022-11-03T10:05:02.664-0400 [INFO] CLI args: []string{"/opt/homebrew/Cellar/tfenv/3.0.0/versions/1.3.3/terraform", "apply"}
2022-11-03T10:05:02.664-0400 [DEBUG] Attempting to open CLI config file: /Users/ian/.terraformrc
diff --git a/15.6.9.md b/15.6.9.md
index 42699e1..67fdf60 100644
--- a/15.6.9.md
+++ b/15.6.9.md
@@ -1,43 +1,40 @@
### SUBCHAPTER IX—STANDARD TIME
### §260. Congressional declaration of policy; adoption and observance of uniform standard of time; authority of Secretary of Transportation
* It is the policy of the United States to promote the adoption and observance of uniform time within the standard time zones prescribed by sections 261 to 264 of this title, as modified by section 265 of this title. To this end the Secretary of Transportation is authorized and directed to foster and promote widespread and uniform adoption and observance of the same standard of time within and throughout each such standard time zone.
@ianonavy
ianonavy / README.md
Created December 20, 2017 20:35
git-update-branch

git-update-branch

Rebase-friendly alternative to the GitHub "Update Branch" button on the pull request page.

Rebases a remote origin branch onto the latest default branch. Right now, hard coded for "develop" even though most people use "master". Feel free to edit.

I personally use this when I have many remote branches to merge and want all of them to be up-to-date with the latest default branch after each rebase. Of course, if you don't prefer rebase as an updating strategy you can just use the "Update branch" button in the GitHub UI. This is a rebase-friendly alternative.

Installation

/*
Generates a perfect solution to http://www.loper-os.org/bad-at-entropy/manmach.html.
Naive algorithm: Maintain array of correct solution so far. Repeat '1' adding each to the solution until the machine scores. When it scores, save the solution, reset, and re-enter the solution up until right before it fails. Toggle between '1' and '0' and continue repeating until the machine scores. Do this until the solution array is size n.
First 1000 digits:
111110000111100001001110111100000101001101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101000111010001110100011101
@ianonavy
ianonavy / config.txt
Created August 29, 2012 14:11
I wrote this script in high school to facilitate the reading of my English textbooks. It splits a text up into individual sentences and flashes them one at a time based on how fast you can read (in words per minute).
Title:
Tartuffe
Filename:
tartuffe.txt
Speed (in words per minute):
600
Saved books:
Title:
@ianonavy
ianonavy / nexus7-setup-wifi.sh
Created August 29, 2012 14:06
Nexus 7 Setup Wi-Fi: a simple script I wrote to help set up the Nexus 7 device for my university's wireless network. For privacy's sake, I've removed all the parts specifically pertaining to the university. This code is public domain, so modify it as need
#!/bin/bash
#
# Nexus 7 Setup Wi-fi
#
# Simple script to set up a Nexus 7 for a WPA2-Enterprise Wireless network
# with 802.1x authentication, which is broken in Android Jelly Bean. It
# relies on rooting the device.
#
# This script is a work in progress. I am not responsible for any issues
# that arise if you run this script with your device. Use at your own
@ianonavy
ianonavy / daemon.py
Created August 14, 2012 15:42
Simple daemon that waits for a screenshot to be saved into a folder and automatically uploads it to a remote server. When that's done, it copies the URL into the user's clipboard. Very similar to CloudApp and Droplr, but it runs on Linux.
#!/usr/bin/env python
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
@ianonavy
ianonavy / wdr_top.py
Created August 9, 2012 01:33
This simple Python script shows the top contributing members of the online community, webdevRefinery. It compiles a list of members with the highest post counts and sorts them by how high their reputations are in proportion to their post counts.
#!/usr/bin/env python
""" wdR Top Contributor List
This simple Python script shows the top contributing members of the online
community, webdevRefinery. It compiles a list of members with the highest post
counts and sorts them by how high their reputations are in proportion to their
post counts.
Author: ianonavy <ian@ianonavy.com>
@ianonavy
ianonavy / dictionary.txt
Created February 5, 2012 22:00
Scramble with Friends Solver. Dictionary from http://code.google.com/p/dotnetperls-controls/downloads/detail?name=enable1.txt&can=2&q= Uses a depth-first search with a tier.
This file has been truncated, but you can view the full file.
aa
aah
aahed
aahing
aahs
aal
aalii
aaliis
aals
aardvark