Skip to content

Instantly share code, notes, and snippets.

@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`"
@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 / 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 / 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 / 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 / roll_ipython_in_aws.md
Last active November 13, 2015 23:43 — forked from iamatypeofwalrus/roll_ipython_in_aws.md
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@seltzered
seltzered / karabiner.json
Created September 30, 2016 23:30
Karabiner Elements: swap left fn key with left control key
{
"profiles": [
{
"name": "Default profile",
"selected": true,
"simple_modifications": {
"fn": "left_control",
"left_control": "fn"
}
}
@seltzered
seltzered / iPhone_ringtone.sh
Last active October 16, 2017 01:57 — forked from oboje/iPhone_ringtone.sh
Create iPhone ringtone from mp3 using ffmpeg
brew reinstall ffmpeg --with-fdk-aac # Needs ffmpeg with faac encoder
ffmpeg -i <input.mp3> -ac 1 -ab 128000 -f mp4 -acodec libfdk_aac -y -ss <beggining_second> -t <length_in_seconds> ringtone.m4r # Length can't be higher than 40 seconds
@seltzered
seltzered / example_with_billsplit.beancount
Created September 2, 2018 21:18
example_with_billsplit.beancount

;; -*- mode: org; mode: beancount; -*- ;; Birth: 1980-05-12 ;; Dates: 2015-01-01 - 2017-09-12 ;; THIS FILE HAS BEEN AUTO-GENERATED, then modified for thing.

Options

option “title” “Example Beancount file” option “operating_currency” “USD”

Keybase proof

I hereby claim:

  • I am seltzered on github.
  • I am v1vek (https://keybase.io/v1vek) on keybase.
  • I have a public key ASBdZgyrfSOCV9alAb1sxQxDSC6rN0KsnM-4NvMkrfGp5Qo

To claim this, I am signing this object: