This file contains 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
$ sudo yum install jre | |
$ wget http://www.apache.org/dist//lucene/solr/1.4.1/apache-solr-1.4.1.tgz | |
$ tar zxvf apache-solr-1.4.1.tgz | |
$ cd apache-solr-1.4.1/example | |
$ java -jar start.jar | |
$ curl http://ec2-###-##-###-###.compute-1.amazonaws.com:8983/solr/select/?q=opengl |
This file contains 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
# lib/active_record_ext.rb | |
module ActiveRecordExtensions | |
def self.included(base) | |
base.extend(ClassMethods) | |
end | |
# attempts to create an 'html-friendly' id | |
def to_html_param(include_class_name = true) | |
if include_class_name |
This file contains 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
# config/initializers/carrierwave.rb | |
module CarrierWave | |
module Uploader | |
module Versions | |
private | |
def full_filename(for_file) | |
super(for_file) | |
end | |
end |
This file contains 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
NSManagedObjectContext *managedObjectContext = ((SGWMAppDelegate *)[UIApplication sharedApplication].delegate).managedObjectContext; | |
NSPersistentStoreCoordinator *persistentStoreCoordinator = ((SGWMAppDelegate *)[UIApplication sharedApplication].delegate).persistentStoreCoordinator; | |
[persistentStoreCoordinator lock]; | |
[managedObjectContext save:&error]; | |
[persistentStoreCoordinator unlock]; |
This file contains 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
// | |
// SGWMScrollView.h | |
// SmartGardenWateringMobile | |
// | |
// Created by Nicholas Bruning on 21/10/11. | |
// Copyright (c) 2011 Involved. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
This file contains 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
#!/usr/bin/env ruby | |
bundle_version_short = %x{/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INFOPLIST_FILE"} | |
bundle_version = %x{/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE"} | |
build_number = bundle_version_short.split(".").first | |
build_number += (bundle_version_short.split(".")[1].to_i + 65).chr | |
build_number += (bundle_version.scan(/\d+[A-Z](\d+)/).flatten.first.to_i + 1).to_s | |
%x{/usr/libexec/PlistBuddy -c "Set :CFBundleVersion #{build_number}" "$INFOPLIST_FILE"} |
This file contains 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
# app/models/address.rb | |
class Address < ActiveRecord::Base | |
belongs_to :addressable, polymorphic: true | |
end |
This file contains 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
<a href="#" class="cover"> | |
<p class="title"> | |
<span class="primary"> | |
{{title}} | |
</span> | |
{{subTitle}} | |
</p> | |
<div class="art"></div> | |
</a> |
This file contains 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
# config.rb | |
after_configuration do | |
if defined?(RailsAssets) | |
RailsAssets.load_paths.each do |path| | |
sprockets.append_path path | |
end | |
end | |
end |
This file contains 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
Hi Coaches! | |
We are so glad to have you on board for Rails Girls this weekend. Here are further details of our schedule for Friday and Saturday, and what to expect. We will also invite you all to our Slack group, so if you have any questions at all please feel free to contact us via email, phone or in Slack. | |
As with all Ruby Australia events we're bound by the Ruby Australia code of conduct (found at: http://ruby.org.au/code-of-conduct.html), let's hope we don't need it but please do make sure you know who the orgnaisers are and be at least familiar with the document. | |
The event is at REA, 511 Church Street, Richmond 3121 - you'll see the REA logo on the building. Head to the front door and there will be somebody to let you in - if you can't see anyone, please call Kate (0409 337 107) or Jo (0428 190 881). | |
We'll kick off around 6pm on Friday, so it would be great if you can make it over to REA by 5:30pm to get set up. We understand that might not be possible for all of you, so we'll try and make sure you ha |
OlderNewer