Skip to content

Instantly share code, notes, and snippets.

View scott-joe's full-sized avatar
🛠️
Tinkering

Scott Williams scott-joe

🛠️
Tinkering
View GitHub Profile

Gather the Top 500 Albums from Rolling Stone

A TamperMonkey Script

About

I'm trying to listen to a new album every day, or at least 365 by the end of a year. To help figure out what to listen to, I thought I could use this list as a source. But their site is slow and riddled with riddled with ad-bloat.

Format

Screenshot 2023-03-20 at 10 54 59

Using

@scott-joe
scott-joe / kitten-game-styles.css
Last active March 1, 2018 19:05
Changes on top of Sleek theme. I've only styled for things I've seen up to something like year 800 but I wanted something a little cleaner.
#calendarSign {
font-size: 22px;
}
#devPanel {
display: none;
}
#gameLog {
font-size: 10px;
@scott-joe
scott-joe / catnip-guard.js
Last active March 1, 2018 17:55
Catnip Guard
// ==UserScript==
// @name Kitten Game
// @namespace www.soilandthesea.com
// @version 0.6.0
// @description Automates certain production cycles
// @author Scott Williams
// @include http://bloodrizer.ru/games/kittens/
// @include http://bloodrizer.ru/games/kittens/#
// @grant none
// ==/UserScript==
@scott-joe
scott-joe / tasks.hidden-tmTheme
Created June 2, 2015 21:08
Non-italic default PlainTasks theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Notebook</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>

###Create and checkout a new branch git checkout -b [branchName]

###Checkout a remote branch git checkout -b [localBranchName] origin/[remoteBranchName]

###Push local branch to remote git push -u origin [branchName]

###Delete remote branch

> kill all ssh-agent entries
ssh-add -D
> kill all ssh-agent running processes
ssh-agent -k
> Create new token(s)
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
@scott-joe
scott-joe / Invisibility
Last active December 19, 2015 13:18
Works like .hide and .show but maintains element height. Based on http://jsfiddle.net/nGhjQ/
(function($) {
$.fn.invisible = function() {
return this.each(function() {
$(this).fadeTo(100, 0);
$(this).css("visibility", "hidden");
});
};
$.fn.visible = function() {
return this.each(function() {
$(this).css("visibility", "visible");
@scott-joe
scott-joe / Sort on object properties
Last active December 19, 2015 06:09
Sorts an array based on a property. Reversible.
//Based on http://jsfiddle.net/dFNva/1/
var events = [
{
event_name: "Recurring",
start_date_time: new Date('Fri May 17 2013 01:00:00 GMT-0400 (EDT)'),
rating: '4.1'
}, {
event_name: "Morning Dive",
start_date_time: new Date('Tue May 14 2013 02:00:00 GMT-0400 (EDT)'),
# implement minimal caching during site development
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico|js|css|pdf|swf|html|htm|txt)$">
Header set Cache-Control "max-age=5"
</FilesMatch>
# explicitly disable caching for scripts and other dynamic files
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
Header unset Cache-Control
</FilesMatch>
@scott-joe
scott-joe / pg-backup.zsh
Last active September 23, 2015 18:55
Automatically create/update Heroku Postgres databases locally. Add to your custom.zsh file or .bashrc. Also, add `/dumps/*` to your .gitignore if you don't want all that in your repo
alias pgstart="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/log/postgres/server.log start"
alias pgstop="pg_ctl -D /usr/local/var/postgres stop -m fast"
# find id of last backup
__getBackupId() {
echo $( heroku pg:backups | grep 'b\d\d\d' | head -1 | cut -b 1-6 | xargs )
}
# get the app's name from heroku info
__getAppName() {