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
| task('increaseVersionCode') << { | |
| def manifestFile = file("src/main/AndroidManifest.xml") | |
| def pattern = Pattern.compile("versionCode=\"(\\d+)\"") | |
| def matcher = pattern.matcher((CharSequence)manifestFile.getText()) | |
| matcher.find() | |
| def versionCode = Integer.parseInt(matcher.group(1)) | |
| manifestFile.write(matcher.replaceAll("versionCode=\"" + ++versionCode + "\"")) | |
| } | |
| assembleDebug.dependsOn 'increaseVersionCode' |
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
| /** | |
| * Copyright (c) 2013 Xcellent Creations, Inc. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining | |
| * a copy of this software and associated documentation files (the | |
| * "Software"), to deal in the Software without restriction, including | |
| * without limitation the rights to use, copy, modify, merge, publish, | |
| * distribute, sublicense, and/or sell copies of the Software, and to | |
| * permit persons to whom the Software is furnished to do so, subject to | |
| * the following conditions: |
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
| sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'` | |
| # or... | |
| sudo killall coreaudiod |
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
| module ActiveRecord | |
| module ConnectionAdapters | |
| module DatabaseStatements | |
| # | |
| # Run the normal transaction method; when it's done, check to see if there | |
| # is exactly one open transaction. If so, that's the transactional | |
| # fixtures transaction; from the model's standpoint, the completed | |
| # transaction is the real deal. Send commit callbacks to models. | |
| # | |
| # If the transaction block raises a Rollback, we need to know, so we don't |
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
| Mongoid.configure do |config| | |
| if ENV['RACK_ENV'] == 'development' # ambiente de desenvolvimento | |
| name = "myapp_development" | |
| host = "localhost" | |
| config.master = Mongo::Connection.new.db(name) | |
| config.slaves = [ Mongo::Connection.new(host, 27017, :slave_ok => true).db(name) ] | |
| else # ambiente de produção | |
| uri = URI.parse(ENV['MONGOHQ_URL']) | |
| config.master = Mongo::Connection.from_uri(ENV['MONGOHQ_URL']).db(uri.path.gsub("/", "")) | |
| end |
NewerOlder