Skip to content

Instantly share code, notes, and snippets.

View robbintt's full-sized avatar
🎯
Focusing

Trent Robbins robbintt

🎯
Focusing
  • San Francisco, CA
View GitHub Profile
@robbintt
robbintt / slack_clean_all.py
Created June 10, 2021 06:27
clean all your slack messages, slack_cleaner2 (pip) isn't great so it's hacked together
''' slack_cleaner2 in pip, also on github
I used an admin account. I'm not sure what perms are required but I installed an app in the space, then added permissions needed to delete my own messages.
'''
import logging
import os
import time
from slack_cleaner2 import SlackCleaner, match_user
@robbintt
robbintt / delete_all_tweets.py
Last active June 9, 2021 06:35
Delete all tweets with tweepy. Sometimes twitter forgets to tell you you have more tweets, so you have to run it later.
''' Bulk delete all your tweets and likes.
Doesn't delete media. Twitter does a terrible job dredging tweets, expect to have to rerun this a few weeks later, I am still not done after my 2nd pass a few weeks later. The "X tweets" seems to be accurate even though none are dispayed.
Export these with a shell script:
export TWITTER_USERNAME=
export TWITTER_CONSUMER_KEY=
export TWITTER_CONSUMER_SECRET=
export TWITTER_ACCESS_TOKEN=
'''
see:
- https://eli.thegreenplace.net/2017/on-recursion-continuations-and-trampolines/
- https://gist.github.com/tylerbrandt/6411f874630aebb0e4ed9b075d6f8d08
'''
import sys
import inspect
#sys.setrecursionlimit(10)
def identity(x):
@robbintt
robbintt / rust-in-large-organizations-notes.md
Created September 4, 2019 22:08 — forked from rylev/rust-in-large-organizations-notes.md
Rust in Large Organizations Notes

Rust in Large Organizations

Initially taken by Niko Matsakis and lightly edited by Ryan Levick

Agenda

  • Introductions
  • Cargo inside large build systems
  • FFI
  • Foundations and financial support
@robbintt
robbintt / mvcr2.py
Last active September 7, 2018 05:35
Just move cr2 files - easier than ancient gnutools wizardry
#!/usr/bin/python
'''
Steps:
1. Sling your CANON100 folder into its new home
2. Rename it with a topic and date and put this script directly in that folder
3. Make a directory called `CR2s` and `mv *.CR2 CR2s/`
4. Delete any jpgs you don't want.
5. Run this program to move the CR2s you do want from `CR2s` back into this folder
6. Delete the CR2s folder manually (it contains leftovers)
@robbintt
robbintt / hundred-prisoner.py
Last active May 10, 2018 22:59
A quick and dirty hundred-prisoner game implementation done over lunch
''' A quick and dirty hundred-prisoner game implementation done over lunch
From: http://datagenetics.com/blog/december42014/index.html
hackernews: https://news.ycombinator.com/item?id=16984815
Assumptions
- The boxes must be indexed, e.g. they must be ordered and the order must be static across prisoners.
The index of the prisoner's list is the order the prisoners will open the box in.
The value of the index is the box they will open.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@robbintt
robbintt / !cube-transformations.stl
Last active December 31, 2017 00:37
Some simple transformations of a cube, generalizing this stuff to make an 'augur' or 'grid' of objects would be fun.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@robbintt
robbintt / !example-oscillator.stl
Created December 30, 2017 11:41
use sin to oscillate
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@robbintt
robbintt / param-cubes.1_by_64.stl
Last active December 30, 2017 09:43
parametrically extruded cubes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.