This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The intent here is to copy a daily backup of Mozilla bookmarks. Because the | |
# SQLITE database file can be as large as 25+ megabytes, if it has been backed up | |
# within the last day, there's no need to copy it over again. | |
# If there is a copy of the database already, bail. Otherwise, copy it. | |
MOZILLA_DIR="$HOME/.mozilla" | |
DIR=$(dirname $0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
var location = window.location; | |
location.pathname = location.pathname.replace('pdf', 'abs').replace('.pdf', '/') | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thanks to https://gist.githubusercontent.com/ImJasonH/c00cdd7aece6945fb8ea/raw/220c97f9e756f5f61eb18630fd7943e3a88e2940/ | |
// Copy the start of javascript to the end and paste it into your bookmark. | |
// Make sure not to have comments | |
javascript: (function () { | |
var list= document.getElementsByTagName('link'); | |
for (var i = 0; i < list.length; i++) { | |
list[i].parentNode.removeChild(list[i]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Demonstrate how to save pd.DataFrame objects to named Excel sheets | |
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_excel.html | |
Requires having openpyxl installed for writing to Excel documents | |
""" | |
import pandas as pd | |
df1 = pd.DataFrame({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: layout_virtualenv <path> | |
# | |
# Sets and loads a Python virtualenvironment from a local path | |
# Eg. `layout_virtualenv venv` | |
layout_virtualenv() { | |
local venv_path=${1:-venv} | |
log_status "Loading $venv_path" | |
load_prefix ${venv_path} | |
source ${venv_path}/bin/activate | |
} |
OlderNewer