Skip to content

Instantly share code, notes, and snippets.

View justinmpier's full-sized avatar

Justin MP justinmpier

View GitHub Profile
# Based on
# https://github.com/ng/paperclip-watermarking-app/blob/master/lib/paperclip_processors/watermark.rb
# Modified by Laurynas Butkus
module Paperclip
class Watermark < Processor
# Handles watermarking of images that are uploaded.
attr_accessor :format, :whiny, :watermark_path, :position
def initialize file, options = {}, attachment = nil
module ActiveAdminHelper
def admin_arbre_context
@admin_arbre_context ||= Arbre::Context.new(assigns, self)
end
def default_renderer
case controller.send(:resource_class).name
when "ActiveAdmin::Page"
"page"
- (NSArray *)sortArray:(NSArray *)originalArray usingSelectionSortAlgorithmInDescendingOrder:(BOOL)descendingOrder {
for (NSUInteger i = 0; i < [originalArray count]; i++) {
if (![[originalArray objectAtIndex:i] isKindOfClass:[NSNumber class]]) {
[NSException raise:@"InvalidArrayException" format:@"InvalidArrayException"];
return nil;
}
}
/*
show-constants.m
Show the control point values for the CAMediaTimingFunction class constants
To compile:
clang -framework QuartzCore -framework Foundation show-constants.m -o show-constants
*/
var options = [];
options['google-ima-ads-manager'] = {
adTagUrl:adTag
};
OO.Player.create('container', EMBED_CODE, options);
@justinmpier
justinmpier / RELEASE_NOTES.md
Created July 25, 2012 19:23 — forked from ivanvc/RELEASE_NOTES.md
Sample Release Notes

1.0.1

  • Bug Fixes
    • [PSE-2020] Hebrew text sometimes rendered incorrectly
    • [PSE-2021]Flash 11.3 sometimes caused a crash on quit
  • Improvements
    • Restored background tabs are not loaded by default for faster startup
    • [PSE-2032] Support for the CSS3 background-position property extended syntax has been added
  • Notes
    • Any comment