Skip to content

Instantly share code, notes, and snippets.

View jkulesza's full-sized avatar

Joel A. Kulesza jkulesza

View GitHub Profile
@wbolster
wbolster / toggle-grayscale
Created December 1, 2014 12:51
AppleScript to toggle grayscale display (for Mac OSX 10.10 Yosemite)
tell application "System Preferences"
activate
set current pane to pane "Accessibility"
end tell
tell application "System Events"
tell process "System Preferences"
click checkbox "Use grayscale" of window 1
end tell
end tell
@mlongval
mlongval / ToggleGrayScaleMode
Last active February 3, 2016 14:46
MacOSX Grayscale Mode Toggle Applescript
(*
ToggleGrayScaleMode for MacOSX 10.9 Mavericks
works as of 15 april 2014
This is an AppleScript UI script to toggle GrayScaleMode in System Preferences.
I am red-green colorblind and grayscale helps a lot...
Works for me. Hope it can be usefull for you.
Mike
@espinielli
espinielli / CKOG-plus.pl
Last active December 19, 2017 19:10
Cahill-Keyes coordinate transformations
#! /usr/bin/perl -w
# December 2010
use Math::Trig;
# Calculate values that should be global, to minimize repeated calculations
($sin60, $cos60, $yTranslate, @Prelims) = Preliminary();
print "($sin60, $cos60, $yTranslate, @Prelims)";
$Skip = "";
unless ($Skip) {
@katylava
katylava / git-selective-merge.md
Last active February 27, 2024 10:18
git selective merge

Update 2022: git checkout -p <other-branch> is basically a shortcut for all this.

FYI This was written in 2010, though I guess people still find it useful at least as of 2021. I haven't had to do it ever again, so if it goes out of date I probably won't know.

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.