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
#!/usr/bin/env ruby | |
require 'optparse' | |
OptionParser.new do |opts| | |
opts.on("-w", "--write", "Write new screensaver message") do |msg| | |
old_msg = `defaults -currentHost read com.apple.ScreenSaver.Basic MESSAGE` | |
system( | |
'defaults', | |
'-currentHost', |
I hereby claim:
- I am meyer on github.
- I am meyer (https://keybase.io/meyer) on keybase.
- I have a public key whose fingerprint is 94B3 59D2 6B18 6FD0 81BB 66F0 B2E6 0B85 E1B2 B1FE
To claim this, I am signing this object:
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 | |
# Make temp dir | |
LIB_DIR="${TMPDIR%%/}/xar-tmp/" | |
mkdir -p "$LIB_DIR" | |
cd "$LIB_DIR" | |
# Install lzma | |
brew install xz |
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
STATUS=`defaults read com.apple.finder CreateDesktop` | |
if [ $STATUS == 0 ]; | |
then | |
# Enable desktop | |
defaults write com.apple.finder CreateDesktop 1 | |
else | |
# Disable desktop | |
defaults write com.apple.finder CreateDesktop 0 | |
fi | |
killall Finder |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import mimetypes, sys | |
import datetime | |
from os import curdir, sep | |
from os.path import splitext | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
import codecs | |
try: |
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
export CD_PATH='' | |
# Source a .cd file in a directory upon cd. OBVI. | |
function fancy_cd(){ | |
# Use the FOR REAL cd | |
command cd "$@" | |
NEW_CD_PATH=`pwd` | |
# Did we source this already? | |
if [[ $NEW_CD_PATH != $CD_PATH ]]; then |