Skip to content

Instantly share code, notes, and snippets.

@thesauri
thesauri / change-mac-address-monterey.md
Created February 22, 2022 15:38
Change MAC address macOS 12 Monterey

Change MAC address in macOS Monterey

I was unable to change the MAC address of the Wi-FI device on a MacBook Air (M1 2020) running macOS Monterey due to the following error: ifconfig: ioctl (SIOCAIFADDR): Can't assign requested addres.

By running the commands in following sequence I was able to change it successfully:

  1. Turn WiFi device off
  2. Turn the WiFi device on again: networksetup -setairportpower en0 on
  3. Change the MAC: ifconfig en0 ether <mac-address-here>
  4. Run: networksetup -detectnewhardware
@thesauri
thesauri / 200-svenska-namn.txt
Created December 18, 2021 10:20
200 svenska namn. 100 män. 100 kvinnor. --- 200 Swedish names. 100 men. 100 women.
Lennart Forsberg
Julia Lundgren
Max Sandström
Barbro Holmgren
Alexander Hansen
Kent Ström
Oliver Hedlund
Sara Karlsson
Felix Eklund
Marcus Månsson
@thesauri
thesauri / 2020-02-02-sas-destinations-iata.csv
Created February 2, 2020 15:47
SAS (Scandinavian Airlines) destinations operated by SAS (not codeshare), 2020-02-02
city_name iata
Aalborg AAL
Aarhus AAR
Billund BLL
Copenhagen CPH
the Faroe Islands FAE
Alta ALF
Bardufoss BDU
Bergen BGO
Bodø BOO
@thesauri
thesauri / 2020-02-02-sas-airport-list.json
Created February 2, 2020 11:35
SAS (Scandinavian Airlines) airport list, used on the website, bookable destinations? 2020-02-02
{
"NAS":{
"code":"NAS",
"names":[
"Nassau",
"Nassau"
],
"frequentlyUsed":"false",
"operatedBy":"SAS",
"cityCode":"NAS",
import markovify
import sys
if len(sys.argv) < 2:
print("tinder.py chat-file.txt")
exit(1)
chat_file = sys.argv[1]
# Get raw text as string.
with open(chat_file) as f:
const fs = require('fs').promises;
const main = async () => {
const dataText = await fs.readFile('data.json');
const data = JSON.parse(dataText);
const matches = data.Messages;
matches.forEach((match) => {
match.messages.forEach((message) => {
console.log(message.message);
});

Keybase proof

I hereby claim:

  • I am thesauri on github.
  • I am thesauri (https://keybase.io/thesauri) on keybase.
  • I have a public key ASCMYcSUSuSzCW-_vfesdv9dIaIRYnRR9giK84TkVse2YQo

To claim this, I am signing this object: