Skip to content

Instantly share code, notes, and snippets.

View flex_sdk.rb
require 'formula'
class FlexSdk < Formula
homepage 'http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK'
url 'http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4/flex_sdk_4.1.0.16076A.zip'
version '4.1.0.16076A'
sha1 'a71bca0715b9a830fe4e74c16fb4c2d9ef9910ca'
def install
libexec.install Dir['*']
View gist:919134
class Item
extend ActiveModel::Naming
extend ActiveModel::Callbacks
include ActiveModel::AttributeMethods
include ActiveModel::Serialization
include ActiveModel::Conversion
include ActiveModel::Validations
define_attribute_methods [:title, :path, :file, :upload_only]
define_model_callbacks :save, :only => :before
View gist:721670
FBL.ns(function() {
with (FBL) {
Firebug.FireRailsMSG = domplate(Firebug.Rep,
{
className: "text",
tag: DIV({style: "white-space:pre"}, "$msg")
});
Firebug.registerStringBundle("chrome://firerails/locale/overlay.properties");
View gist:721595
before_validation(:reject_bad_attributes)
def reject_bad_attributes
attributes_to_be_rejected = [:a, :b, :c]
self.attributes = self.attributes.reject { |key, value| attributes_to_be_rejcted.include?(key) }
end
View Partial
<key>SearchNameOnly</key>
<true/>
@pkondzior
pkondzior / default_smart.plist
Created Nov 29, 2010
My default_smart.plist configuration that sets Finder spotlight to search files by name.
View default_smart.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CompatibleVersion</key>
<integer>1</integer>
<key>RawQuery</key>
<string>((_kMDItemGroupId > 6))</string>
<key>SearchCriteria</key>
<dict>