Skip to content

Instantly share code, notes, and snippets.

@seltzered
seltzered / CGSPrivate.h
Created October 2, 2015 05:29 — forked from rjw57/CGSPrivate.h
CGSPrivate.h - undocumented APIs for OSX. Re-licensed under MIT licence.
/* CGSPrivate.h -- Header file for undocumented CoreGraphics stuff. */
/* This file is a relicensed portion of DesktopManager and was originally released under
* the terms of the GNU General Public Licence. Original licence text follows the new terms.
* The contents of this file has been re-released by the original author under the following terms:
*
* Copyright (C) 2003, 2004, 2013 Richard J Wareham <richwareham@users.sourceforge.net>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
@seltzered
seltzered / gist:3b627104c8a7a39b863c
Last active October 21, 2022 18:17
Mac OSX Set Sound Output to Internal Speakers.applescript
-- Script to set sound output - "Internal Speakers" hardcoded as I just keep multiple scripts for each output source (e.g. Internal Speakers, Airplay, bluetooth ) and use it with a quicklaunch app such as quicksilver.
-- Based off of Pierre L's answer in https://discussions.apple.com/thread/4629093?tstart=0 , which includes a selection dialog
set asrc to "Internal Speakers"
tell application "System Preferences"
reveal anchor "output" of pane id "com.apple.preference.sound"
activate
@seltzered
seltzered / IllustratorSaveAsSVGs.jsx
Last active August 1, 2023 17:56
Quick little script to batch-convert Illustrator .ai's to .svg's, based on Adobe's sample 'save to pdf's' script. Save it to a jsx, and load it under illustrator. Intended for Illustrator CS6.
/**********************************************************
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2010 Adobe Systems Incorporated
All Rights Reserved
NOTICE: Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it.
If you have received this file from a source
@seltzered
seltzered / hack.sh
Created April 7, 2012 02:34 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@seltzered
seltzered / gist:2323939
Created April 6, 2012 23:30 — forked from stepchud/gist:2241056
Installing ruby-debug19 on ruby 1.9.3-p0 on Mac OS X Lion 10.7.2 with Xcode 4.2.1
# assumes 1.9.3-p0 is already installed in RVM (1.9.2) and you are in an empty gemset
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
gem install rake
gem install archive-tar-minitar
gem install ruby_core_source
gem install columnize
gem install linecache19-0.5.13.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`"
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include="$rvm_path/src/`rvm tools strings`"