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
| #!/bin/sh | |
| # | |
| # update_storyboard_strings.sh - automatically extract translatable strings from storyboards and update strings files | |
| # Source: https://gist.github.com/marcadams/6825053 | |
| # Based on http://forums.macrumors.com/showpost.php?p=16060008&postcount=4 by mikezang | |
| storyboardExt=".storyboard" | |
| stringsExt=".strings" | |
| newStringsExt=".strings.new" | |
| oldStringsExt=".strings.old" |
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
| @GrabResolver(name='grails-core', root='http://repo.grails.org/grails/core') | |
| @Grab(group='org.grails', module='grails-datastore-gorm-mongo', version='1.0.0.BUILD-SNAPSHOT') | |
| @Grab(group='org.slf4j', module='slf4j-simple', version='1.6.1') | |
| import grails.persistence.* | |
| import org.grails.datastore.gorm.mongo.config.* | |
| MongoDatastoreConfigurer.configure("myDatabase", Book) | |
| Book.withSession { |
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
| @GrabResolver(name='grails-core', root='http://repo.grails.org/grails/core') | |
| @Grab(group='org.grails', module='grails-datastore-gorm-mongo', version='1.0.0.BUILD-SNAPSHOT') | |
| @Grab(group='org.slf4j', module='slf4j-simple', version='1.6.1') | |
| import grails.persistence.* | |
| import org.grails.datastore.gorm.mongo.config.* | |
| MongoDatastoreConfigurer.configure("myDatabase", Book) | |
| Book.withSession { |
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
| class FacebookPaginator < WillPaginate::LinkRenderer | |
| include WillPaginate::ViewHelpers | |
| def stringified_merge(target, other) | |
| other.each do |key, value| | |
| key = key.to_s # this line is what it's all about! | |
| next if "fb_sig_friends" == key | |
| existing = target[key] | |
| if value.is_a?(Hash) and (existing.is_a?(Hash) or existing.nil?) |