Skip to content

Instantly share code, notes, and snippets.

View scottrobertson's full-sized avatar

Scott Robertson scottrobertson

View GitHub Profile
@scottrobertson
scottrobertson / domain_from_url.js
Last active December 26, 2021 19:46
Automatically generate an email address from the current Safari page. Useful for signing up for services.
// Make sure to run `yarn add tld-extract` / `npm install tld-extract`
const { exec } = require("child_process");
var tldParser = require("tld-extract");
exec(
"osascript -e 'tell app \"safari\" to get the url of the current tab of window 1'",
(_error, stdout) => {
try {
const parsedDomain = tldParser(stdout);
const regex = new RegExp(`.${parsedDomain.tld}`);
@scottrobertson
scottrobertson / file
Created February 18, 2017 21:27
freedom_public
{"0.5263414931486381":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgMEoo/rsFE+oQ3IHjY4vtSKW8x2X75aScAB\r\nR1pCLSarw6xUQJtaaldk7CaAa8d+i9di9lCEpSmTFHV6o6eu5Mn6sM3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWKi8Rv8AAAACiwn/AAAACZCMWeO2+oMq\r\nJP8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAAWtoBAKigMUdJ8zF1\r\n0iT04W4qhE9meXljQW8sRyjW42FR1/28AQDxZpe0XWiwDF8sZjkS67HlpVSdcbmG\r\n+PyfBV/cYmIiG87/AAAAVgQAAAAAEggqhkjOPQMBBwIDBNYple3NHo18hwAVd3sg\r\nJkNHHYOYGzOC4fCKIqPwZaLJiukQ7kiZWsYGO/FWiDW/VHEVXHkMckXRspoG19vF\r\nReUDAQgHwv8AAABtBBgTCAAf/wAAAAWCWKi8Rv8AAAAJkIxZ47b6gyok/wAAAAKb\r\nDAAA5F4BAKuEymU/KASgXUBWNAsWXeBNw2GejgKEpRMzYnwx34pwAP9KF30F6ad0\r\nRIh6F74i8pNtKi88sLzIU3Qea5pa91r+0Q==\r\n=fzbx\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}
def something
'something'
end
require 'csv'
letters = ['a', 'b', 'c']
numbers = [1,2,3]
numbers_2 = [4,5,6]
csv_string = CSV.generate do |csv|
letters.each_with_index do |letter, index|
csv << [
letter,
Verifying I am +scottymeuk on my passcard. https://onename.com/scottymeuk
time wget http://ipv4.download.thinkbroadband.com/512MB.zip
--2015-05-02 20:12:42-- http://ipv4.download.thinkbroadband.com/512MB.zip
Resolving ipv4.download.thinkbroadband.com... 80.249.99.148
Connecting to ipv4.download.thinkbroadband.com|80.249.99.148|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 536870912 (512M) [application/zip]
Saving to: '512MB.zip'
512MB.zip 100%[================================================================================================>] 512.00M 17.8MB/s in 36s

Drinks:

  • Tazo Tea
  • Filter Coffee
  • Cafe Misto with Soy
  • Steamed Soy with or without syrups
  • Espresso
  • Espresso Macchiato with Soy
  • Cafe Americano black or with Soy
  • Soy Lattes with or without syrups
  • Soy Cappuccinos with or without syrups
server {
listen 80;
server_name movies.blah.com;
location / {
proxy_pass http://127.0.0.1:5050;
}
}
Verifying that +scottrobertson is my Bitcoin username. You can send me #bitcoin here: https://onename.io/scottrobertson

Keybase proof

I hereby claim:

  • I am scottrobertson on github.
  • I am scottrobertson (https://keybase.io/scottrobertson) on keybase.
  • I have a public key whose fingerprint is 6334 E871 3F57 92B0 2259 949C E667 1C8B 70CD B6E3

To claim this, I am signing this object: