Skip to content

Instantly share code, notes, and snippets.

Avatar

Lyle Mantooth IslandUsurper

  • @vpsinc
  • Pewee Valley, KY
View GitHub Profile
@IslandUsurper
IslandUsurper / default.nix
Last active August 3, 2020 13:21
LBRY 0.45.1 Nix expression (WIP)
View default.nix
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs {};
in
pkgs.stdenv.mkDerivation rec {
pname = "lbry";
version = "0.45.1";
src = pkgs.fetchurl {
url = "https://github.com/lbryio/lbry-desktop/releases/download/v${version}/LBRY_${version}.deb";
sha256 = "01qa9aqscb6y4p4i5kjn1vd6pfr08wb9062yc21nhndb9blka9pr";
View keybase.md

Keybase proof

I hereby claim:

  • I am islandusurper on github.
  • I am islandusurper (https://keybase.io/islandusurper) on keybase.
  • I have a public key ASAG0Zto9GNYzTvF6tgz6hLRhzKr8qU7nHTGvh8Ad5rU7wo

To claim this, I am signing this object:

@IslandUsurper
IslandUsurper / example.xml
Created December 22, 2017 13:31
Rust and XML schema
View example.xml
<ErrorRecovery>
<ListID>1235623425</ListID>
<EditSequence>whatever</EditSequence>
</ErrorRecovery>
<ErrorRecovery>
<OwnerID>FOO</OwnerID>
</ErrorRecovery>
<ErrorRecovery>
<TxnID>18302-1488303-random-numbers</TxnId>
<TxnNumber>9492023</TxnNumber>
@IslandUsurper
IslandUsurper / flatten.py
Created September 19, 2016 17:17
Flatten an arbitrarily nested array
View flatten.py
def flatten(items):
"""
Flatten a nested list of integers.
Passing a non-list instead returns a list containing the argument.
"""
if not isinstance(items, list):
return [items]
result = []
@IslandUsurper
IslandUsurper / aws.yml
Last active June 15, 2016 18:06
Setting up VPC subnets
View aws.yml
- name: Create VPC
ec2_vpc_net:
cidr_block: 10.0.0.0/16
name: {{ Environment }}
state: present
tenancy: default
register: vpc
- name: Create Internet gateway
ec2_vpc_igw: vpc_id={{ vpc.vpc.id }} state=present
@IslandUsurper
IslandUsurper / gist:12723643dddc9315ff71
Created March 10, 2015 18:50
Behat Step to select an autocomplete suggestion
View gist:12723643dddc9315ff71
<?php
use Behat\Mink\Extension\ElementNotFoundException;
use Drupal\DrupalExtension\Context\DrupalContext;
class FeatureContext extends DrupalContext {
/**
* @When I select the first autocomplete option for :prefix on the :field field
*/
@IslandUsurper
IslandUsurper / pe_18.rs
Created October 8, 2014 01:33
What can I do to prevent borrowing errors?
View pe_18.rs
use std::io::{BufferedReader, File};
use std::num::FromStrRadix;
#[deriving(Show)]
struct TreeNode<'a> {
value: uint,
left: Option<&'a TreeNode<'a>>,
right: Option<&'a TreeNode<'a>>,
}