Skip to content

Instantly share code, notes, and snippets.

View stuartsaunders's full-sized avatar
👋

Stuart Saunders stuartsaunders

👋
View GitHub Profile
@rpavlik
rpavlik / rules.txt
Created January 5, 2018 16:13
Stop CNet Auto-Play Videos
! Block annoying CNet auto-play videos.
! Tried to make it targeted so that if you actually wanted to watch a video, you could...
! Tested/works with uBlock Origin
! Block the playlist
www.cnet.com/videos/manifest/*.m3u8?device=ott*
! Block the script that loads the playlists
*.cbsistatic.com/fly/js/pages/desktop/article_video_test*.js
! Element hiding: hide the now-useless placeholder
www.cnet.com##.entered.dock.inviewElement
@fno2010
fno2010 / wacom-mac-remover.sh
Created December 14, 2018 19:31
Clear all the installed files by Wacom Driver
#/bin/bash
# Clear all the installed files by Wacom Driver
rm -rf /Applications/Wacom\ Tablet.localized
rm -rf /Applications/Pen\ Tablet.localized
rm -rf /Library/Application\ Support/Tablet
rm -rf /Library/Extensions/Wacom\ Tablet.kext
@defunkt
defunkt / connection_fix.rb
Created November 19, 2009 20:00
MySQL server has gone away fix
# If your workers are inactive for a long period of time, they'll lose
# their MySQL connection.
#
# This hack ensures we re-connect whenever a connection is
# lost. Because, really. why not?
#
# Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar)
#
# From:
# http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/
@snuggs
snuggs / .tmux.conf
Last active February 7, 2023 13:51
IDE & TMUX Configuration
############################################################################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
# Cheatsheets:
# https://devhints.io/tmux
# `property not found` issue:
@gagarine
gagarine / install-clamav-osx.md
Last active June 7, 2023 07:54
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf
@danjargold
danjargold / whatFilesHaveIShared.gs
Created August 11, 2018 09:31
Google script to list (on a Google Sheet) all files shared in your google drive, including all viewers, editors, and sharing permissions. Credit goes to @woodwardtw (https://gist.github.com/woodwardtw/22a199ecca73ff15a0eb) as this is an improvement on his code which only assesses a single folder and one level of sub-folders down.
function listFolders(folder) {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name", "Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]); //writes the headers
//var folder = DriveApp.getFolderById("INSERT_YOUR_FILE_ID");//that long chunk of random numbers/letters in the URL when you navigate to the folder
//getLooseFiles(folder, sheet);
//getSubFolders(folder, sheet);
//instead of getting folder by ID rather get all folders and cycle through each. Note this will miss loose files in parent directory.
var folder = DriveApp.getFolders()
@searls
searls / .solargraph.yml
Last active August 2, 2023 09:14 — forked from DRBragg/.solargraph.yml
My config with steps to use solargraph for Rails projects in VS Code (WIP)
---
include:
- ".solargraph_definitions.rb"
- "app/**/*.rb"
- "config/**/*.rb"
- "lib/**/*.rb"
exclude:
- test/**/*
- vendor/**/*
- ".bundle/**/*"
@jesstelford
jesstelford / 01-shape-up-to-kindle.md
Last active January 10, 2024 20:08
Read SHAPE UP by basecamp on a Kindle / reMarkable / eReader

Read Shape Up by basecamp on a kindle / reMarkable / eReader

Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.

There is a .pdf version, but that's not the best format for Kindle / other eReaders. Instead, we can convert the page-by-page into an eReader friendly format.

Part 1: Convert to a single page

NOTE: This has only been tested on Chrome

@eguven
eguven / brew-list.sh
Last active February 7, 2024 06:16
List all packages installed using Homebrew and their sizes
brew list --formula | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
@douglasjarquin
douglasjarquin / gist:2208690
Created March 26, 2012 18:58
Amazon RDS Performance Tuning Settings
rds-modify-db-parameter-group {param-group-name} \
--parameters="name=character_set_server, value=utf8, method=pending-reboot" \
--parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \
--parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \
--parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \
--parameters="name=query_cache_type, value=1, method=pending-reboot" \
--parameters="name=query_cache_size, value=131072, method=pending-reboot" \
--parameters="name=table_open_cache, value=2500, method=pending-reboot" \
--parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \
--parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \