Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

David Brownman xavdid

🏠
Working from home
View GitHub Profile
@gboudreau
gboudreau / fix-google-drive-dark-mode-icons.sh
Created Nov 6, 2014
Fix Google Drive menuBar icon for dark mode
View fix-google-drive-dark-mode-icons.sh
#!/bin/bash
function switch_files {
mv $1.png $1.tmp.png
mv $1-inverse.png $1.png
mv $1.tmp.png $1-inverse.png
mv $1@2x.png $1@2x.tmp.png
mv $1-inverse@2x.png $1@2x.png
mv $1@2x.tmp.png $1-inverse@2x.png
}
View gist:7863c6c248f76e14a3a8
# strip out iBooks citation
sed -E -e 's/^[ ]?[0-9]* //g' | sed -E -e 's/“[ ]?[0-9]?[ ]?//g' | sed -E -e 's/”$//g' | sed -E -e 's/^(Excerpt From).*//g'
@dhutchison
dhutchison / DropboxSync.py
Last active Aug 29, 2015
Python script for use with Pythonista which will sync all scripts to Dropbox. Requires a Dropbox API key. This script has moved to: https://github.com/dhutchison/PythonistaScripts
View DropboxSync.py
# Script to sync Pythonista files to Dropbox
# Author: David Hutchison
# www: http://www.devwithimagination.com/
# Now in the repository
# https://github.com/dhutchison/PythonistaScripts
View gist:8818129
The Challenge
-------------
Given the following riddle, write a regular expression describing all possible answers,
assuming you never make a move which simply undoes the last one you made.
The Riddle
----------
You are on your way somewhere, taking with you your cabbage, goat, and wolf, as always.
You come upon a river and are compelled to cross it, but you can only carry one of the
three companions at a time. None of them can swim because this isn't THAT kind of riddle.
@johntyree
johntyree / getBlockLists.sh
Last active Sep 20, 2022
Make one large blocklist from the bluetack lists on iblocklist.com
View getBlockLists.sh
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@Chrisedmo
Chrisedmo / Mountain Lion tweaks
Created Jul 30, 2012
Mountain Lion tweaks (under the hood)
View Mountain Lion tweaks
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
scutil --set ComputerName "MathBook Pro"
scutil --set HostName "MathBook Pro"
scutil --set LocalHostName "MathBook-Pro"