Skip to content

Instantly share code, notes, and snippets.

# For those times you forgot to add some stuff before committing.
[alias]
derpsquish = "!git add . && git commit -a --amend -C HEAD"
After many failed attempts, I have installed scipy on my M1 MBP! The approach that worked for me was
[similar to this one](https://github.com/scipy/scipy/issues/13409#issuecomment-886939243):
```
pip install cython pybind11 pythran
pip install --no-binary :all: --no-use-pep517 numpy
brew install gfortran openblas
export OPENBLAS=/opt/homebrew/opt/openblas/lib/
pip install --no-binary :all: --no-use-pep517 scipy
```
@thatandromeda
thatandromeda / c4l20_scripts.md
Created March 9, 2020 20:05
Scripts referenced during my Code4lib 2020 conference talk.
@thatandromeda
thatandromeda / twitter.css
Created August 28, 2019 10:01
CSS to remove trending topics, thereby making Twitter more humane
/* 28 August 2019 */
div[aria-label="Timeline: Trending now"] {
display: none;
}
/* If you use Chrome and gmail and wish your ALA Connect emails had a text-only option, this will get you pretty close.
1) Install the Stylus extension
2) Go to "write style for your URL" and copy-paste this file in (I would apply it to a URL like
https://mail.google.com/mail/u/0/#label/Board, assuming you're filtering your mail to a labeled place - if you use this
on the entirety of mail.google.com you may get undesired subject line behavior).
3) You may need to change the "margin: -160px;" line below, depending on your font and the name of your group. It's
intended to cut off the group name so you can see the actual message subject, but of course your group name may vary,
so change this number until you're happy with the way a subject looks.
*/
def insert_comma(mystring, position):
mystring[:position] + ',' + mystring[position:]
offset = 0
for magic_number in magic_numbers:
position = magic_number + offset
mystring = insert_comma(mystring, position)
offset += 1
@thatandromeda
thatandromeda / .gitconfig
Created June 27, 2018 14:41
git cleanup
# This alias lets you use "git cleanup" in the following scenario:
# - you're on a branch
# - that branch just got merged on the remote
# - you would like to switch to master, update it, and delete your now-useless local branch
# - you don't want to type three almost-identical commands every time you do this thing you do all the time
# Yay! Now you can do the thing in two words.
[alias]
cleanup = "!f() { branch_name=$(git rev-parse --abbrev-ref HEAD); git checkout master; git branch -D ${branch_name}; git pull;}; f"