Skip to content

Instantly share code, notes, and snippets.

@mattjj
mattjj / jax_taylor.py
Last active September 30, 2021 11:58
from functools import partial
from math import factorial
import jax.numpy as np
import matplotlib.pyplot as plt
from jax import jvp, vmap
def f(x):
return 1./5 * x**3 + 3 * x**2 - x + 1.
@dropmeaword
dropmeaword / browser_history.md
Last active April 5, 2024 17:37
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

Did you see my talk about strace? Do you want to know more? Here's your chance!

If you didn't, and you want to watch it, go watch it! Spying on your programs with strace

more strace resources (Linux-only)

@dbieber
dbieber / .bashrc
Last active December 24, 2015 06:09
Use this .bashrc file for an unfamiliar machine.
EDITOR=vim
alias edit=$EDITOR
alias c="clear;pwd;ls"
alias rc=". ~/.bashrc"
alias eb="edit ~/.bashrc"
alias ..="cd .."
alias cd..="cd .."
alias ll="ls -al"
function k() {
@plamere
plamere / dedup.py
Created June 25, 2011 13:05
dedup.py - uses echoprint to find duplicates in a music collection
#!/usr/bin/python
import sys
import os
import pprint
import subprocess
import pickle
import atexit
import simplejson as json
sys.path.insert(0, "../API")