Skip to content

Instantly share code, notes, and snippets.

View pkondzior's full-sized avatar

Paweł Kondzior pkondzior

View GitHub Profile
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['*']
@pkondzior
pkondzior / Partial
Created November 29, 2010 12:50
Partial
<key>SearchNameOnly</key>
<true/>
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
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");
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
@pkondzior
pkondzior / default_smart.plist
Created November 29, 2010 12:47
My default_smart.plist configuration that sets Finder spotlight to search files by name.
<?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>