Skip to content

Instantly share code, notes, and snippets.

View renderorange's full-sized avatar

Blaine Motsinger renderorange

View GitHub Profile
@renderorange
renderorange / every
Created November 1, 2021 17:22 — forked from sorbits/every
Run «command» only every «number» time invoked
#!/usr/bin/env bash
progname=$(basename $0)
version="1.0 (2014-08-17)"
step=2
function create_hash {
openssl dgst -sha1 -binary <<< "$1" | xxd -p
}
@renderorange
renderorange / tolkien_and_the_chief_hero.md
Last active June 27, 2021 22:42
Tolkien and the chief hero

I’ve seen various comments on this subreddit arguing against Sam being considered the chief hero, based on Tolkien's letter 131. While I agree Tolkien wasn’t diminishing Frodo’s heroism, I don’t agree we should cast out Sam as the chief hero only because the larger context of the letter wasn’t about heroism.

The debated section from letter 131.

Since we now try to deal with 'ordinary life', springing up ever unquenched under the trample of world policies and events, there are love-stories touched in, or love in different modes, wholly absent from The Hobbit. But the highest love-story, that of Aragorn and Arwen Elrond's daughter is only alluded to as a known thing. It is told elsewhere in a short tale. Of Aragorn and Arwen Undómiel. I think the simple 'rustic' love of Sam and his Rosie (nowhere elaborated) is absolutely essential to the study of his (the chief hero's) character, and to the theme of the relation of ordinary life (breathing, eating, working, begetting) and quests, sacrifice, causes, and th

@renderorange
renderorange / NetwatchGatewayStates.rsc
Created July 2, 2020 01:11 — forked from heri16/NetwatchGatewayStates.rsc
Mikrotik RouterOS Script to do proper uplink failover/failback (more reliable than Netwatch)
# Mikrotik RouterOS Script to do proper uplink failover/failback (more reliable than Netwatch).
# Supports both Generic and PPPoE interfaces.
# Policy: read, write, policy, test
### Configuration ###
# Define Names of all Interfaces that will be checked:
:local "interface-names" { "internet-speedy";"internet-biznet" };
### Keybase proof
I hereby claim:
* I am renderorange on github.
* I am renderorange (https://keybase.io/renderorange) on keybase.
* I have a public key ASBLxJ15x3md42ou3JxrLUzHyLtWAkVXRNc4QwJYHuoH8wo
To claim this, I am signing this object:
@renderorange
renderorange / config
Last active March 27, 2019 00:10
ssh config for authentication with github
Host github.com
IdentityFile ~/.ssh/id_rsa
User git
@renderorange
renderorange / getSenateBillsPassed.js
Last active October 16, 2018 01:06
propublica GET request via javascript
const request = require( 'request' );
let options = {
url: 'https://api.propublica.org/congress/v1/115/senate/bills/passed.json',
headers: {
'X-API-Key': 'apikeygoeshere'
},
json: true
};
function Person( first, last ) {
this.firstName = first;
this.lastName = last;
}
Person.prototype.getInitials = function() {
let firstInitial = this.firstName.substring( 0, 1 ).toUpperCase();
let lastInitial = this.lastName.substring( 0 , 1 ).toUpperCase();
return firstInitial + lastInitial;
};
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
$|=1;
#!/usr/bin/perl
use strict;
use warnings;
my ( $csv, $date_low, $date_high ) = @ARGV;
# my $counter = 0;
open( my $csv_fh, '<', $csv ) or die "open $csv: $!\n";
@renderorange
renderorange / change_this.php
Last active October 13, 2015 04:44
change_this
<?php
class Auth extends TestCase
{
private $auth_token;
// verify API response if invalid credentials
function test_invalid_credentials()
{
$this->post('/authenticate', ['email' => 'false', 'password' => 'false'])