This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface NSArray (FRBMethods) | |
| - (NSArray *)map:(id (^)(id item))block; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sdef /Applications/iCal.app | sdp -fh --basename iCal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface NSWindow (FRBExtra) | |
| - (NSImage *)windowImage; | |
| - (CGImageRef)windowImageShot; | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # View rules | |
| sudo ipfw show | |
| # Add rule | |
| sudo ipfw add 100 fwd 127.0.0.1,3000 tcp from any to me dst-port 80 | |
| # Remove rules | |
| sudo ipfw flush |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module FriendlyId | |
| module ActiveRecordAdapter | |
| def has_another_friendly_id method, options={} | |
| if FriendlyId::on_ar3? | |
| class_attribute :friendly_ids if !self.respond_to?(:friendly_ids) | |
| self.friendly_ids ||= [] | |
| config = Configuration.new(self, method, options) | |
| self.friendly_ids << config | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| group :development do | |
| gem "rails_mail_preview", "0.0.2" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i SCENIC_DRIVE.m4v -qscale 5 -s 480x360 -r 15 -ar 22050 scenic_drive2.flv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tar -zcvf filename.tar.gz ./directory_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh -L 3307:domain.name.of.mysqlserver:3306 [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Download and extract the latest RTMPDump source tarball, open a Terminal window and cd to the directory you just extracted the sources, i.e. ./rtmpdump-2.3 | |
| We need to make a small change in the Makefile in the ./librtmp directory, so you need to cd into that directory | |
| Edit Makefile in ./librtmp and replace -soname with -dylib_install_name | |
| cd .. | |
| sudo make install SYS=posix |