Skip to content

Instantly share code, notes, and snippets.

View cweirup's full-sized avatar

Chris Weirup cweirup

View GitHub Profile
@marmot401
marmot401 / outlook2011_attachment_remover.scpt
Created August 1, 2013 02:15
modified apple script, https://gist.github.com/cweirup/3058303 7/31/13 updated the script so that running the script on multiple emails does not cause the attachment list to grow.
-- AppleScript to remove attachment from selected messages in Outlook 2011
-- Incorporates code from these sources:
-- http://dice.neko-san.net/2012/03/strip-attachments-from-outlook-2011-using-applescript/
-- http://stackoverflow.com/questions/9617029/how-to-get-the-a-file-url-in-osx-with-applescript-or-a-shell-script (for path2url function)
-- https://gist.github.com/cweirup/3058303
-- 7/31/13 updated the script so that running the script on multiple emails does not cause the attachment list to grow. Moved "repeat with theMessage in selectedMessages" to a better place
on path2url(thepath)
-- Needed to properly URL encode the path
return do shell script "python -c \"import urllib, sys; print (urllib.quote(sys.argv[1]))\" " & quoted form of thepath
@jadeatucker
jadeatucker / HOWTODMG.md
Last active December 20, 2025 20:51
How to create a "DMG Installer" for Mac OS X

Creating a "DMG installer" for OS X

A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.

##Creating the DMG file #Disk Utility

@earlonrails
earlonrails / toggle.js
Last active December 23, 2017 18:24
pure javascript version of jQuery's toggle. Now with show and hide! Yay!
HTMLElement.prototype.show = function(){
this.style.display = '';
}
HTMLElement.prototype.hide = function(){
this.style.display = 'none';
}
HTMLElement.prototype.toggle = function(){
if (this.style.display == 'none'){
@erichurst
erichurst / database.yml.example mysql2
Created May 9, 2011 02:58
Rails 3 database.yml examples
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
@alterisian
alterisian / heroku_to_github.txt
Created October 28, 2010 13:10
How to git your existing heroku app into a new github repo
git remote add github [EMAIL PROTECTED]:myaccount/myapp.git
git remote add heroku [EMAIL PROTECTED]:myapp.git
Then you can do “git push heroku” and “git push github”, or pull, or
From: http://blog.mindtonic.net/using-github-and-heroku-together