Skip to content

Instantly share code, notes, and snippets.

View rye's full-sized avatar
🦀
wranglin' Cow<T>'s

Kris Rye rye

🦀
wranglin' Cow<T>'s
View GitHub Profile
This file has been truncated, but you can view the full file.
{"type":"FeatureCollection","name":"tl_2010_18157_tabblock10","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4269"}},"features":[{"type":"Feature","properties":{"STATEFP10":"18","COUNTYFP10":"157","TRACTCE10":"011100","BLOCKCE10":"2091","GEOID10":"181570111002091","NAME10":"Block 2091","MTFCC10":"G5040","UR10":"U","UACE10":"46018","UATYP10":"U","FUNCSTAT10":"S","ALAND10":5977,"AWATER10":0,"INTPTLAT10":"+40.4033248","INTPTLON10":"-086.9067438"},"geometry":{"type":"Polygon","coordinates":[[[-86.906101,40.403435],[-86.906192,40.403378],[-86.906447,40.403234],[-86.906528,40.403189],[-86.907525,40.402703],[-86.90778,40.40258],[-86.907886,40.402529],[-86.907555,40.402832],[-86.906565,40.403743],[-86.906235,40.404047],[-86.906208,40.403924],[-86.906127,40.403557],[-86.906101,40.403435]]]}},{"type":"Feature","properties":{"STATEFP10":"18","COUNTYFP10":"157","TRACTCE10":"001501","BLOCKCE10":"1004","GEOID10":"181570015011004","NAME10":"Block 1004","MTFCC10":"G5040","UR10":"U","UACE10":"46018","UATYP10
@rye
rye / naughty_list
Last active December 9, 2019 17:38
A list of IP addresses that have tried (and failed) to log into my systems.
1.55.17.162
1.186.45.250
1.245.61.144
2.136.131.36
2.139.199.51
2.152.111.49
2.228.149.174
3.92.185.11
3.94.79.149
3.133.90.152

Keybase proof

I hereby claim:

  • I am rye on github.
  • I am krstfrye (https://keybase.io/krstfrye) on keybase.
  • I have a public key ASC7DhUX31cMaKAPn_s5ZWQ2HZVfBik5EhE_2h-_8V-bWwo

To claim this, I am signing this object:

#!/bin/bash
for i in raid{5,6,10};
do
echo ">>> Benchmarking $i..."
sudo bonnie++ -c 1 -d /$i -s 524288 -n 1024 -m $i -u root -bf 2>&1 | sudo tee $i.out
echo ">>> Done!"
echo ">>> Cleaning up... (sync; echo 3 > /proc/sys/vm/drop_caches)"
sudo sync
@rye
rye / check_machine_status.sh
Created June 12, 2017 20:28
Checks the status of a list of machines using SSH blank firing.
#!/bin/bash
function check_user_and_host {
_ssh_result=$(ssh -o ConnectTimeout=5 -o BatchMode=yes -o StrictHostKeyChecking=no $1@$2 "echo \"\`who | grep -c . \`\"; true" 2>/dev/null)
}
function check_and_output_host {
check_user_and_host $1 $2 && echo "$2: up, $_ssh_result users logged in" || echo "$2: down"
}
@rye
rye / output.txt
Created December 8, 2016 18:26
Output from Make when I compile @shyouhei's ruby version
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Werror=implicit-int -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=division-by-zero -Werror=deprecated-declarations -Werror=extra-tokens -pipe
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin16 -I./include -I. -I./enc/unicode/data/8.0.0
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -Wl,-pie -framework CoreFoundation
SOLIBS = -lgmp
Apple LLVM version 8.0.0
@rye
rye / monoid-firehose.rb
Last active November 26, 2015 20:45
Drink from the Monoid firehose! (Downloads the latest Monoid release)
require 'uri'
require 'net/http'
module Monoid
class Site
attr_accessor :base_uri
def initialize(base_uri = URI.parse('https://larsenwork.com'))
@base_uri = base_uri
end
@rye
rye / defunct.sh
Created June 15, 2015 16:18
Print out a list of PID's that are defunct
#!/bin/sh
ruby -e "\"`ps -ef|grep \<defunct\>`\".split(/$/).each{|l|puts(l.match(/^(?<user>\w+)\W+(?<pid>\d+)\W+(?<ppid>\d+)/)[:pid])}"
@rye
rye / bezier.rb
Created May 7, 2015 17:45
A Ruby script to calculate Bézier curves.
require "matrix"
require "pry"
class Integer
# Method to compute binomial coefficient nCk (where n is this object,
# and k is some other integer.
def choose(k)
# n! / (n-k)!
top = (((self-k)+1)..(self)).inject(1, &:*)
require "net/http"
require "pry"
# Parameters for episode looping.
#
# Note that 404 seems to be reserved for whining.
MIN_EPISODE_NUMBER = 001
MAX_EPISODE_NUMBER = 417
FORMAT = ".ogv"