Skip to content

Instantly share code, notes, and snippets.

Avatar
🍕
gimme pizza

meyer meyer

🍕
gimme pizza
View GitHub Profile
@meyer
meyer / set-screensaver-message.rb
Created Sep 23, 2015
set-screensaver-message.rb
View 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',
View keybase.md

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 Jan 2, 2016 — forked from omarstreak/Install XAR
Install patched version of XAR 1.6.1. Installs to /usr/local
View install_xar.sh
#!/bin/bash
# Make temp dir
LIB_DIR="${TMPDIR%%/}/xar-tmp/"
mkdir -p "$LIB_DIR"
cd "$LIB_DIR"
# Install lzma
brew install xz
View toggle-desktop-icons.sh
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
View serve.py
#!/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:
View fancy_cd.sh
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