"Best practice" for Javascript widgets: Doesn't use any libraries, doesn't pollute the global namespace, it's cross-browser (to the best of my knowledge), and it's very small. Inspired by Get Satisfaction and Emil Stenström.
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
| <?php echo FastPass::script("lmwjv4kzwi27", "fiei6iv61jnoukaq1aylwd8vcmnkafrs", "scott@getsatisfaction.com", "Scott", "nullstyle", false, array("twitter_name" => "nullstyle")), time()+60*60*24*30); ?> |
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
| <a onclick="GSFN.goto_gsfn()" href="#">Our Support Community</a> |
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
| Cerf:Users kimjoar$ brew install go | |
| Warning: It appears you have Macports or Fink installed | |
| Although, unlikely, this can break builds or cause obscure runtime issues. | |
| If you experience problems try uninstalling these tools. | |
| /usr/local/bin/hg | |
| ==> Cloning https://go.googlecode.com/hg/ | |
| requesting all changes | |
| adding changesets | |
| adding manifests | |
| adding file changes |
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/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/filter_parameters.rb:78:in `process_parameter_filter' | |
| /usr/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/filter_parameters.rb:84:in `block (2 levels) in process_parameter_filter' | |
| /usr/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/filter_parameters.rb:84:in `map' | |
| /usr/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/filter_parameters.rb:84:in `block in process_parameter_filter' | |
| /usr/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/filter_parameters.rb:78:in `each' | |
| /usr/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/filter_parameters.rb:78:in `process_parameter_filter' | |
| /usr/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/filter_parameters.rb:82:in `block in process_parameter_filter' | |
| /usr/local/Cellar/Gems/1.9.1/gems/actionpack-3.0.0.beta/lib/action_dispatch/http/f |
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
| require 'nokogiri' | |
| require 'highline/import' | |
| require 'instapush' | |
| pinboard_username = ask("Enter your Pinboard username: ") { |q| q.echo = true } | |
| pinboard_password = ask("Enter your Pinboard password: ") { |q| q.echo = "*" } | |
| bookmarks = `wget http://#{pinboard_username}:#{pinboard_password}@pinboard.in/export/` | |
| instapaper_username = ask("Enter your Instapaper username: ") { |q| q.echo = true } |
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
| nb: | |
| errors: | |
| messages: | |
| not_found: "ikke funnet" | |
| already_confirmed: "har allerede blitt bekreftet. Prøv å logg inn." | |
| not_locked: "var ikke låst" | |
| not_saved: | |
| one: "Én feil gjorde at %{resource} ikke kunne lagres:" | |
| other: "%{count} feil gjorde at %{resource} ikke kunne lagres:" | |
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
| >> "test".class | |
| => String | |
| >> -1.class | |
| => Fixnum | |
| >> :test.class | |
| => Symbol | |
| >> /^(.*)$/.class |
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
| def answer(q) | |
| case q | |
| when /.+: my name is (.+). what is my name/ | |
| $1 | |
| else | |
| "" | |
| end | |
| end | |
| puts answer("3fe7b6c0: my name is fred. what is my name") |
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
| it("should list all persons in response", function() { | |
| // fetch an Ajax response | |
| var response = readFixtures("responses/persons.json"); | |
| var options = {}; // no additional options for the Ajax request | |
| // create our view, sending in an empty collection | |
| var view = new PersonsView({ collection: new Persons() }); | |
| view.render(); // show header and other static stuff |