Skip to content

Instantly share code, notes, and snippets.

View iwootten's full-sized avatar

Ian Wootten iwootten

View GitHub Profile
@iwootten
iwootten / screenvox.json
Last active December 14, 2023 15:56
Updater for the current version of screenvox
{
"version": "v0.0.1",
"notes": "Version 0.0.1",
"pub_date": "2023-12-14T11:36:49.2023",
"platforms": {
"darwin-aarch64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVTV3BURCtFZGFaSW5ncDBFTzJCYjMrUG1PckVWZHp0VW9hMEFGSGgxV2FJY2RCaGVKL2t4MVZhTGJyMFVyQXo2Y2grTm10VlhMY3VOME5MUnBidW1PcFJ6bmZ2cU9QK1FzPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzAyNTU1NTk2CWZpbGU6c2NyZWVudm94LmFwcC50YXIuZ3oKQkxObjE5L3FhRnpzT0dQUEh6aWIxNEJpSnFZT2M0RHIxY0NLbWt1ZEVCRzNYb3hJOThiMUVGNXRwNlFQRUlYTzdsVnQyMTNyL1lNTS9xOFdDR0VJRGc9PQo=",
"url": "https://screenvox.com/releases/download/v0.0.1/screenvox.app.tar.gz"
}
}
@iwootten
iwootten / gist:81e7dc835d173efbd46f6230bea68bd5
Created July 14, 2023 15:43
Python Libs installed in Code Interpreter
'absl-py==1.4.0',
'affine==2.4.0',
'aiohttp==3.8.1',
'aiosignal==1.3.1',
'analytics-python==1.4.post1',
'anyio==3.7.1',
'anytree==2.8.0',
'argcomplete==1.10.3',
'argon2-cffi-bindings==21.2.0',
'argon2-cffi==21.3.0',
@iwootten
iwootten / get_best_10_tweets.sh
Created December 29, 2022 12:41
Find your Best 10 Tweets with jq
# Download your twitter archive
# Edit tweets.js into a json array
# Run this to find best tweets
cat tweets.json | jq '[.[].tweet | {
retweets: .retweet_count | tonumber,
favourites: .favorite_count | tonumber,
text: .full_text,
url: "https://twitter.com/<your_twitter_handle>/status/\(.id)"
}] | sort_by(.retweets)[-10:]'
@iwootten
iwootten / get_best_tweets.sh
Created November 12, 2022 18:09
Find your Best Tweets with jq
# Download your twitter archive
# Edit tweets.js into a json array
# Run this to find best tweets
cat tweets.json | jq '[.[].tweet | {
retweets: .retweet_count | tonumber,
favourites: .favorite_count | tonumber,
text: .full_text,
url: "https://twitter.com/<your_twitter_handle>/status/\(.id)"
}] | sort_by(.retweets)'
@iwootten
iwootten / karol_example.py
Created March 4, 2022 14:26
Example of Accessing a Task within and Shot within and Episode
import ftrack_api
session = ftrack_api.Session()
result = session.query('select id from Task '
'where name is "Animation" '
'and project.full_name is "{0}" '
'and parent.parent.name is "{1}" '
'and parent.name is "{2}"'.format("Karol Example", "EP_05_TEST", 44))
@iwootten
iwootten / publish_lambda_layer.sh
Created January 27, 2022 13:49
Publishes Python Dependencies in a requirements.txt to a AWS Lambda Layer
REGION=eu-west-2
RUNTIME=python3.8
LAYER_NAME=scrapy
docker run -v $(pwd):/out -it lambci/lambda:build-$RUNTIME \
pip install -r /out/requirements.txt -t /out/build/$LAYER_NAME/python
cd build/$LAYER_NAME
zip -r ../../$LAYER_NAME.zip python/
cd ../..
@iwootten
iwootten / freeze.txt
Last active November 29, 2021 18:02
List of Installed Python Packages on Raspberry Pi OS Bullseye
arandr==0.1.10
astroid==2.5.1
asttokens==2.0.4
automationhat==0.2.0
beautifulsoup4==4.9.3
blinker==1.4
blinkt==0.1.2
buttonshim==0.0.2
Cap1xxx==0.1.3
certifi==2020.6.20
from rgbkeypad import RGBKeypad
import time
keypad = RGBKeypad()
keypad.color = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
import time
import picokeypad as keypad
keypad.init()
keypad.set_brightness(1.0)
lit = 0
last_button_states = 0
colour_index = 0
@iwootten
iwootten / start_docker_compose.sh
Created January 29, 2016 11:45
Use your docker-machine host ip as docker-compose environment variable
sed -e "s/DOCKER_HOST_IP/$(docker-machine ip your-machine-name)/g" docker-compose.yml | docker-compose --file - up