Skip to content

Instantly share code, notes, and snippets.

View Jaharmi's full-sized avatar
👋
You had me at ‘Hello World’!

Jeremy Reichman Jaharmi

👋
You had me at ‘Hello World’!
  • Landenberg, PA
  • 14:28 (UTC -04:00)
View GitHub Profile
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active June 16, 2024 09:00
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@aaroneaton
aaroneaton / gist:3955554
Last active January 5, 2016 15:46
AppleScript:Do Not Disturb on Microsoft Link
-- Save the foreground application
tell application "System Events"
set currentApp to name of 1st process whose frontmost is true
end tell
-- Get Lync in the foreground so we can use the menu
tell application "Microsoft Lync"
activate
end tell
@gregneagle
gregneagle / gist:6957826
Last active January 4, 2021 09:39
Using PyObjC and NSWorkspace to set the desktop picture. I am such a hypocrite!
#!/usr/bin/python
'''Uses Cocoa classes via PyObjC to set a random desktop picture on all screens.
Tested on Mountain Lion and Mavericks.
See:
https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSWorkspace_Class/Reference/Reference.html
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html
@sloria
sloria / bobp-python.md
Last active July 21, 2024 04:44
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@poritsky
poritsky / mail-rules-to-sieve.applescript
Last active December 8, 2023 22:04
Apple Mail Rules to FastMail Advanced Sieve Rules
(*
Apple Mail Rules to FastMail Advanced Sieve Rules
Jonathan Poritsky, candlerblog.com
November 8, 2013
---
For more information on FastMail server rules (and requisite warnings) read Gabe Weatherhead's piece on transitioning to server-side mail rules:
http://www.macdrifter.com/2013/11/server-side-mail-rules.html
*)
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@ejdyksen
ejdyksen / patch-edid.md
Last active July 18, 2024 14:37
A script to fix EDID problems on external monitors in macOS

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

@JamesChevalier
JamesChevalier / mac_utf8_insanity.md
Last active July 23, 2024 09:31
Unicode on Mac is insane. Mac OS X uses NFD while everything else uses NFC. This fixes that.

convmv manpage

Install convmv if you don't have it

sudo apt-get install convmv

Convert all files in a directory from NFD to NFC:

convmv -r -f utf8 -t utf8 --nfc --notest .

@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@L422Y
L422Y / osx_automount_nfs.md
Last active July 19, 2024 10:12
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service