View happy_eyeballs.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'thread' | |
class ThreadInterrupt < RuntimeError; end | |
def try_ip | |
if rand(2).zero? | |
sleep 0.5 | |
true | |
else | |
sleep(rand(5) + 1) |
View output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
best [:SOCK_STREAM, :SOCK_DGRAM, :SOCK_SEQPACKET] | |
:SOCK_STREAM TYPE SOCK_STREAM | |
:SOCK_DGRAM TYPE SOCK_DGRAM | |
:SOCK_SEQPACKET TYPE SOCK_SEQPACKET | |
other [nil, :SOCK_RAW] | |
nil TYPE SOCK_STREAM | |
:SOCK_RAW TYPE SOCK_DGRAM | |
unsupported [:SOCK_RDM, :SOCK_PACKET, :SOCK_NONBLOCK, :SOCK_CLOEXEC] |
View configuration.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MONITORING: services run on loopback interface | |
# nginx reverse proxy exposes services to network | |
# - grafana:3010 | |
# - prometheus:3020 | |
# - loki:3030 | |
# - promtail:3031 | |
# prometheus: port 3020 (8020) | |
# | |
services.prometheus = { |
View shell.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
with python3Packages; | |
let | |
testing_common_database = buildPythonPackage rec { | |
pname = "testing.common.database"; | |
version = "2.0.3"; | |
src = fetchPypi { | |
inherit pname version; |
View configuration.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit this configuration file to define what should be installed on | |
# your system. Help is available in the configuration.nix(5) man page | |
# and in the NixOS manual (accessible by running ‘nixos-help’). | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix |
View gist:f940d107fd13e725a29d62af25189e4f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gggI trained Aikido for many years. About the third year, I began a very basic rings routine coupled with running two miles per day. The running meant I no longer ran out of breath during class unless I was testing. The rings meant my hip speed was faster than ever before and I could counter just about every attack with a level of comfort I never had before the rings. | |
Because my core was so stable and strong, when I turned my hips, my feet and shoulders moved at the same time, like a door. Long lanky me became super quick for the first time in my life. Better shape and posture than in college basketball. Still skinny, but deceptively strong, even at extreme angles. | |
No injuries to shoulders and a chronic back pain between my shoulder blades went away (shiatsu also played a roll in the pain going away). | |
What was my ring routine? Dead hangs every day, adding a second a day (that's all; one second) until I could hang for two minutes. This took a few months. | |
Then I started over with one arm dead hangs until e |
View private_methods.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def initialize | |
@foo = :foo | |
end | |
private | |
def bar | |
:bar | |
end |
View constant_lookup_with_nesting.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# normal nesting | |
module Outer | |
X = 1 | |
Y = 2 | |
class C | |
X = Y | |
end | |
end | |
# alternative nesting |
View command-processor.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.def_builtin_commands(delegation_class, command_specs) | |
for meth, args in command_specs | |
arg_str = args.collect{|arg| arg.downcase}.join(", ") | |
call_arg_str = args.collect{ | |
|arg| | |
case arg | |
when /^(FILENAME.*)$/ | |
format("expand_path(%s)", $1.downcase) | |
when /^(\*FILENAME.*)$/ | |
# \*FILENAME* -> filenames.collect{|fn| expand_path(fn)}.join(", ") |
View minirake_output.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rwh@DESKTOP-VA6OTK5:/mnt/c/Users/Rick/git/mruby_tools/mruby$ ruby minirake --trace | |
(in /mnt/c/Users/Rick/git/mruby_tools/mruby) | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/tasks/toolchains/gcc.rake:38: warning: Insecure world writable dir /mnt/c in PATH, mode 040777 | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/bin/mrbc | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/bin/mirb | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/bin/mruby | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/bin/mruby-strip | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/bin/mrdb | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/build/test/bin/mirb | |
/mnt/c/Users/Rick/git/mruby_tools/mruby/build/test/bin/mruby |
NewerOlder