Skip to content

Instantly share code, notes, and snippets.

@davehouse
davehouse / is_rosetta_translated.py
Created September 17, 2021 20:46
macos: from python->sysctl check if a process is running translated with rosetta (false: native arm64)
#!/usr/bin/env python
import os
#print('Python executing as {}'.format(os.uname()[4]))
import sys
from ctypes import *
from ctypes.util import find_library
import struct
@davehouse
davehouse / dict.sh
Created January 15, 2020 05:40
bash local dictionary using wordnet+python
# source or copy this in your .bashrc or where you keep your shell functions
function dict() {
python -c "from nltk.corpus import wordnet as wn;import json;\
print(json.dumps({x.name(): [x.definition()] + x.examples() \
for x in wn.synsets('$1')},indent=2))" \
|| echo -e "\nSetup python NLTK + WordNet like:
pip install nltk && python -c \"import nltk; nltk.download('wordnet')\""
}
@davehouse
davehouse / .taskcluster.yml
Created May 24, 2019 14:56 — forked from grenade/.taskcluster.yml
run a set of commands on multiple taskcluster worker types
provisionerId: aws-provisioner-v1
workerType: github-worker
retries: 5
priority: highest
created: '2019-05-23T11:09:17.216Z'
deadline: '2019-05-24T11:09:17.216Z'
expires: '2019-06-20T11:09:17.216Z'
scopes:
- 'queue:scheduler-id:taskcluster-github'
- 'queue:create-task:aws-provisioner-v1/gecko-t-win*'

Keybase proof

I hereby claim:

  • I am davehouse on github.
  • I am dhouse (https://keybase.io/dhouse) on keybase.
  • I have a public key whose fingerprint is 22AA 9B46 84FD FA5E 4752 89C5 2873 4DBB 852A B21D

To claim this, I am signing this object: