Skip to content

Instantly share code, notes, and snippets.

  • Install MacPorts
  • Install apple-gcc-42 via MacPorts: sudo port install apple-gcc-42
  • Install RVM (I had some issues with stable, so I went with 1.10.2, but stable might work for you):
    • bash -s -- --version 1.10.2 < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
    • bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
  • Install Ruby 1.8.7 using apple-gcc-42: CC=/opt/local/bin/gcc-apple-4.2 rvm install 1.8.7
  • Enjoy!

Stop Mysql Server Mac OS X

MacPorts

sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql.plist
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql.plist

Binary Installer

MYPROJECT_RUBIES = {
'ruby-1.8.7-p302' => {:alias => 'dms187', :odbc => '0.99991'},
}
namespace :rvm do
task :setup do
unless @rvm_setup
rvm_lib_path = "#{`echo $rvm_path`.strip}/lib"
$LOAD_PATH.unshift(rvm_lib_path) unless $LOAD_PATH.include?(rvm_lib_path)
port -y install git-core
---> Computing dependencies for git-core
---> Dependencies to be installed: curl curl-ca-bundle perl5 perl5.8 libidn gettext expat libiconv gperf ncurses ncursesw openssl zlib pkgconfig p5-error python26 bzip2 db46 gdbm readline sqlite3 rsync popt
For perl5.8: skipping org.macports.main (dry run)
For perl5: skipping org.macports.main (dry run)
For curl-ca-bundle: skipping org.macports.main (dry run)
For expat: skipping org.macports.main (dry run)
For gperf: skipping org.macports.main (dry run)
For libiconv: skipping org.macports.main (dry run)
For ncursesw: skipping org.macports.main (dry run)
#!/usr/bin/python
# READ FIRST
# This software poll HP2LY every 5 minutes and will play
# any ffmpeg supported file 20 times after 95%.
# To quit press Ctrl+C in Terminal.
# Closing ffplay would just respawn it.
#
# Dependency:
# Ubuntu: sudo apt-get install ffmpeg
# Fedora: su -c 'yum install ffmpeg'
#!/usr/bin/env python2.6
## MacPorts needless dependency cleaning. Edit 'keep' first!!!
#
## requires python >= 2.6!
#
## Vincent Fiano <ynniv@ynniv.com>
# FIXME: the packages that you care about go here!
keep = ['libidl', 'graphviz', 'bash-completion']
@urielm
urielm / setup.py
Created July 18, 2013 21:34 — forked from fish2000/setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Installation script for the vlfeat module
"""
import sys, os
from distutils.core import Extension, setup
from distutils.errors import DistutilsFileError
@urielm
urielm / ua.py
Created July 18, 2013 21:34 — forked from dstufft/ua.py
This file has been truncated, but you can view the full file.
""
""Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.0.14) Gecko/2009090216 Firefox/3.0.14""
"'"
"''"
"'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)'"
"'Mozilla/4.0 (compatible; MSIE 6.1; Windows NT 5.2)'"
"'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)'"
"'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727)'"
"'Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.13) Gecko/2009073022 Firefox/3.0.13'"
# GDC Vault videos can't be watched on mobile devices and this is a very sad thing indeed!
# This script is designed to circumvent this by downloading the lecture and slideshow
# videos which can then be re-encoded into whatever format you wish.
# Note: this code is rather flimsy and was written as fast as possible for my own personal use.
# The code only works for the most recent GDC Vault videos, since they all use the same player
# format. If the XML format used to run the player is changed (as it has in the past), the code
# will have to be reconfigured. In the past, I was able to feed a wget-compatible cookies.txt
# file into the wget call, but I can't get it to trigger anymore. So for now, the way I download
# each video is I look at the source for the player page, find the player.html URL, and feed
"""Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipulate resource
names being passed into the API.
The package resource API is designed to work with normal filesystem packages,