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
#!/usr/bin/env ruby | |
if %w(-h --help).include?(ARGV.first) | |
abort <<~USAGE | |
#{__FILE__} <FILE> to count IPs in given file | |
#{__FILE__} to count IPs using latest file on disk | |
DL=1 #{__FILE__} to download the AWS IP ranges | |
USAGE | |
end |
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 'mechanize' | |
require 'yaml' | |
$results = [] | |
def find(a, link) | |
puts "find started on #{link}" | |
a.get link do |page| | |
page.search(:css, ".blog-post").each do |post| | |
h2 = post.search(:css, "h2").first |
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
#!/usr/bin/env ruby | |
require "openssl" | |
BEGIN_CERT = "-----BEGIN CERTIFICATE-----" | |
END_CERT = "-----END CERTIFICATE-----" | |
def debug(str) | |
return unless ENV.key?("DEBUG") | |
puts "[DEBUG] #{str}" |
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
$ docker run --rm -it ruby:3.2.2 bash | |
Unable to find image 'ruby:3.2.2' locally | |
3.2.2: Pulling from library/ruby | |
918547b94326: Pull complete | |
5d79063a01c5: Pull complete | |
4eedd9c5abf7: Pull complete | |
9cdadd40055f: Pull complete | |
199731bb2986: Pull complete | |
dcf5010fd812: Pull complete | |
a6cfe86a8ac7: Pull complete |
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
#!/usr/local/bin/zsh | |
# | |
# jage <johan@imum.net> http://jage.se | |
# dentarg <patrik@starkast.net> http://dentarg.net | |
# | |
# Settings | |
#OPENBSD_CVS='anoncvs@anoncvs.se.openbsd.org:/cvs' | |
OPENBSD_CVS='anoncvs@anoncvs.de.openbsd.org:/cvs' | |
NETBSD_CVS='anoncvs@anoncvs.se.netbsd.org:/cvsroot' |
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
$ ifconfig en2 | |
en2: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 | |
options=4<VLAN_MTU> | |
ether a0:ce:c8:c0:7a:22 | |
inet6 fe80::99:b10a:761a:3a90%en2 prefixlen 64 secured scopeid 0xc | |
inet 213.21.109.70 netmask 0xffffff80 broadcast 213.21.109.127 | |
nd6 options=201<PERFORMNUD,DAD> | |
media: autoselect (1000baseT <full-duplex>) | |
status: active |
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
function run(input, parameters) { | |
const appName = ""; | |
const verbose = true; | |
const scriptName = "close_notifications_applescript"; | |
const CLEAR_ALL_ACTION = "Clear All"; | |
const CLEAR_ALL_ACTION_TOP = "Clear"; | |
const CLOSE_ACTION = "Close"; |
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
# Need to use ~/.zshenv, ~/.zprofile is not sourced when doing "arch -x86_64 /bin/zsh" | |
# | |
# From 'man zsh' (zsh 5.8.1 (x86_64-apple-darwin21.0)) | |
# | |
# Commands are then read from $ZDOTDIR/.zshenv. If the shell is a login | |
# shell, commands are read from /etc/zprofile and then $ZDOTDIR/.zprofile. | |
# Then, if the shell is interactive, commands are read from /etc/zshrc and | |
# then $ZDOTDIR/.zshrc. Finally, if the shell is a login shell, | |
# /etc/zlogin and $ZDOTDIR/.zlogin are read. |
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
# encoding: utf-8 | |
require 'main' | |
require 'terminal-table' | |
# SELECT ...|DELETE FROM tbl | |
# INSERT INTO tbl | |
# UPDATE tbl | |
def read_tables |
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
$ host debug.fly.dev | |
debug.fly.dev has address 188.93.151.254 | |
debug.fly.dev has IPv6 address 2a09:8280:1:763f:8bdd:34d1:c624:78cd | |
$ curl -o /dev/null -s -v --http1.1 --header 'Host: debug.fly.dev' https://188.93.151.254 | |
* Trying 188.93.151.254:443... | |
* Connected to 188.93.151.254 (188.93.151.254) port 443 (#0) | |
* ALPN: offers http/1.1 | |
} [5 bytes data] | |
* TLSv1.3 (OUT), TLS handshake, Client hello (1): |
NewerOlder