I hereby claim:
- I am bilbof on github.
- I am billfranklin (https://keybase.io/billfranklin) on keybase.
- I have a public key whose fingerprint is 043E E74B 05E6 AF25 D6C7 692E 1CC3 9911 7A8E 87F3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
while : | |
do | |
echo "add State:/Network/Interface/en0/RefreshConfiguration temporary" | sudo scutil | |
echo "refresh" | |
sleep 5 | |
done |
# this script fetches the content items for finders (search UIs) on GOV.UK | |
require 'httparty' | |
def request(url) | |
JSON.parse(HTTParty.get(url).body) | |
end | |
def finders_urls | |
finders = request('https://www.gov.uk/api/search.json?filter_content_store_document_type=finder&count=100&fields=link').dig('results') | |
finders.map { |finder| finder['link'] } |
require 'csv' | |
require 'json' | |
# Needs an in.csv with query and count columns. | |
def normalise_query(query) | |
query.downcase.gsub('+', ' ').strip # .split(' ').sort.join(' ') | |
end | |
data = File.open('in.csv').read |
0 |
foo: bar |
redis = Redis.new | |
top_n = 20 | |
# top N keys and their size in kb | |
big_keys = redis.keys.map { |k| [k, redis.memory("usage", k) / 1024.0] }.sort_by { |a,b| b }.last(top_n) |
<!DOCTYPE NETSCAPE-Bookmark-file-1> | |
<!-- This is an automatically generated file. | |
It will be read and overwritten. | |
DO NOT EDIT! --> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
<TITLE>Bookmarks</TITLE> | |
<H1>Bookmarks</H1> | |
<DL><p> | |
<DT><H3 ADD_DATE="1745785481" LAST_MODIFIED="1745785531">Netflix</H3> | |
<DL><p> |