Skip to content

Instantly share code, notes, and snippets.

View meyer's full-sized avatar
🍕
gimme pizza

meyer meyer

🍕
gimme pizza
View GitHub Profile
@meyer
meyer / set-screensaver-message.rb
Created September 23, 2015 20:15
set-screensaver-message.rb
#!/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',

Keybase proof

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:

@meyer
meyer / install_xar.sh
Last active September 13, 2024 03:02 — forked from omarstreak/Install XAR
Install patched version of XAR 1.6.1. Installs to /usr/local
#!/bin/bash
# Make temp dir
LIB_DIR="${TMPDIR%%/}/xar-tmp/"
mkdir -p "$LIB_DIR"
cd "$LIB_DIR"
# Install lzma
brew install xz
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
@meyer
meyer / serve.py
Last active August 8, 2016 02:14
#!/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:
@meyer
meyer / fancy_cd.sh
Last active September 27, 2015 23:37
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