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
| // JQuery Best Practices | |
| /************* Scope *********************/ | |
| // write methods that add handlers etc. so that they can be re-used in scopes other than document.ready | |
| // http://www.braindonor.net/blog/jquery-best-practices-part-1-managing-scope/406/ | |
| function my_button(scope) { | |
| scope.find('.button').click(function(){ |
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
| knife node show 4_box_lamp-loadbalancer-0 -ahaproxy #run on dev machine | |
| haproxy: | |
| app_server_role: app_server | |
| balance_algorithm: roundrobin | |
| enable_admin: true | |
| enable_ssl: false | |
| incoming_port: 80 | |
| member_max_connections: 100 | |
| member_port: 8080 |
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
| Process: Anki [546] | |
| Path: /Applications/Anki.app/Contents/MacOS/Anki | |
| Identifier: net.ichi2.anki | |
| Version: 1.2.8 (1.2.8) | |
| Code Type: X86-64 (Native) | |
| Parent Process: launchd [206] | |
| Date/Time: 2012-01-26 20:08:00.475 -0800 | |
| OS Version: Mac OS X 10.6.8 (10K549) | |
| Report Version: 6 |
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
| #!/usr/bin/env ruby -KU | |
| require "rubygems" | |
| require "thor" | |
| require "tmpdir" | |
| class GemFromGit < Thor | |
| include Thor::Actions | |
| desc "install GIT-USER/REPO", "install a gem from github source." |
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
| lasto:~/clients/partnerpedia/partnerpedia/vendor/mobihand_adapter(cisco/mobihand_adapter)$ pickler search | |
| 13175469 :D % We need to set up an app in vendor | |
| 13174209 :) 4 MobiHand Adapter authenticates with Marketplace API | |
| 13174383 :) 2 Catalog Adapter authenticates with the MobiHand API | |
| 13174439 :) 2 Catalog adapter notifies operations user of errors | |
| 13280233 :) 2 Catalog gets feed of products to import | |
| 13318681 :/ % Test double for Mobihand | |
| 13280683 :/ 4 Catalog adapter queues products from feed | |
| 13174537 :| 4 Product Importer creates company for the product | |
| 13254403 :| 0 Change external_edit_url to not required |
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
| #!/usr/bin/env ruby | |
| editor = ENV['EDITOR'] || 'mate' | |
| begin | |
| require 'highline/import' | |
| rescue Exception | |
| puts "\e[33minstalling highline...(#{Process.pid})\e[0m" | |
| require 'rubygems/command.rb' | |
| require 'rubygems/dependency_installer.rb' |
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
| ruby "create the vagrant chef webui user" do | |
| code <<-EOH | |
| require 'rubygems' | |
| require 'chef/webui_user' | |
| Chef::Config[:node_name] = Chef::Config[:web_ui_client_name] | |
| Chef::Config[:client_key] = Chef::Config[:web_ui_key] | |
| exit(0) if Chef::WebUIUser.list.keys.include?("#{node[:vagrant][:webui_user][:username]}") | |
| v = Chef::WebUIUser.new | |
| v.name = "#{node[:vagrant][:webui_user][:username]}" | |
| v.set_password "#{node[:vagrant][:webui_user][:password]}" |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'highline' | |
| require 'yaml' | |
| ENV['HOME'] | |
| user_name = ARGV[1] || 'root' | |
| key_name = ARGV[2] | |
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
| self._template_roots = self._template_roots. | |
| push([self._template_root / "theme", :template_location_with_portal_app_and_theme]) | |
| class << self | |
| def signup_controller_for_portal_app_and_theme(portal_app, theme) | |
| return self.controller_name if self.subclasses_list.empty? | |
| unless theme.nil? | |
| controller_name = "#{portal_app.name}_#{theme.name}_signup" |
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
| identify(PortalApp => :name, Theme => :name) do | |
| themify = proc do |request, params| | |
| portal_app = PortalApp.portal_app_from_params(params) | |
| unless portal_app.nil? | |
| theme = portal_app.theme_from_params(params) | |
| controller = SageUsers.signup_controller_for_portal_app_and_theme(portal_app, theme) | |
| params.merge!(:controller => controller) | |
| end | |
| params | |
| end |