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
@translations_split = {} | |
@translations.each do |key, default_translation| | |
tran_parts = key.split('.') | |
current_position = @translations_split | |
while tran_parts.length > 1 | |
next_part = tran_parts.shift | |
unless current_position[next_part] | |
current_position[next_part] = {} | |
end | |
current_position = current_position[next_part] |
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
[Tue, 11 Jan 2011 11:08:57 -0600] DEBUG: looking for template web_app.conf.erb in cookbook :potsdam | |
[Tue, 11 Jan 2011 11:08:57 -0600] DEBUG: Skipping file /var/lib/chef/repo/cookbooks/potsdam/templates/web_app.conf.erb, as it doesn't have a proper segment. |
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
--(root@jadams-desktop)-(68/pts/0)-(1157/11-Jan-11)-- | |
--($:/var/lib/chef/repo)(master)-- | |
$ git diff | |
diff --git a/cookbooks/potsdam/recipes/default.rb b/cookbooks/potsdam/recipes/default.rb | |
index 1e2b8ad..c65e852 100644 | |
--- a/cookbooks/potsdam/recipes/default.rb | |
+++ b/cookbooks/potsdam/recipes/default.rb | |
@@ -16,6 +16,9 @@ | |
# See the License for the specific language governing permissions and | |
# limitations under the License. |
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
# cookbooks/passenger/recipes/default.rb | |
require_recipe "apache2" | |
# Required to compile passenger | |
package "apache2-prefork-dev" | |
rvm_gem ["passenger"] do | |
action :install |
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
# Make a module that, when extended on an ActiveRecord class, will do the following: | |
# 1) Get the array Klass.state_machines.keys # => [:state] | |
# 2) states.each {|state| "def #{state}; blah; end; def #{state}=; blah; end" } | |
# NOTE: the code above should modify the getters and setters to actually look at the StateMachineState polymorphic table, write there and read there. | |
# 3) Take care of named scopes as well, because those will be broken. | |
# 4) Other, unknown yet still broken stuff |
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
--($:~/work/subtle)-- hg diff -g Rakefile | |
diff --git a/Rakefile b/Rakefile | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -20,15 +20,17 @@ | |
# | |
# Options / defines {{{ | |
@options = { | |
- "destdir" => "", | |
- "prefix" => "/usr", |
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
$ ./gnome-shell --replace | |
Starting dconf-service... started | |
Gtk-Message: Failed to load module "globalmenu-plugin": libglobalmenu-plugin.so: cannot open shared object file: No such file or directory | |
mutter: symbol lookup error: /home/jadams/gnome-shell/install/lib64/gtk-3.0/modules/libcanberra-gtk-module.so: undefined symbol: gtk_quit_add | |
--(jadams@goro)-(14/pts/0)-(1015/22-Jan-11)-- | |
--($:~/gnome-shell/source/gnome-shell/src)(master)-- | |
$ Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager. |
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
diff --git a/config/environments/cucumber.rb b/config/environments/cucumber.rb | |
index d559e10..5cfd256 100644 | |
--- a/config/environments/cucumber.rb | |
+++ b/config/environments/cucumber.rb | |
@@ -28,7 +28,7 @@ config.gem 'rspec', :lib => false, :version => '>=1.3.0' unless File. | |
config.gem 'rspec-rails', :lib => false, :version => '>=1.3.2' unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails')) | |
config.gem 'pickle' | |
config.gem 'delorean' | |
-config.gem 'faker' | |
+config.gem 'ffaker' |
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
testing gist.vim |
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
diff --git a/app/controllers/home_page_controller.rb b/app/controllers/home_page_controller.rb | |
index 70f00ba..7db6f4f 100644 | |
--- a/app/controllers/home_page_controller.rb | |
+++ b/app/controllers/home_page_controller.rb | |
@@ -4,23 +4,31 @@ class HomePageController < ApplicationController | |
def index | |
if admin? || current_user.reporter? | |
- redirect_to(admin_base_path) | |
+ #redirect_to(admin_base_path) |