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
| DEPRECATION WARNING: Object#returning has been deprecated in favor of Object#tap. (called from root_path at (eval):4) | |
| ActionView::TemplateError (wrong number of arguments (0 for 1)) on line #1 of app/views/public/index.html.erb: | |
| 1: <%= root_path %> | |
| vendor/gems/routing-filter-0.1.6/lib/routing_filter/filters/locale.rb:55:in `around_generate' | |
| vendor/gems/routing-filter-0.1.6/lib/routing_filter/filter.rb:11:in `run' | |
| vendor/gems/routing-filter-0.1.6/lib/routing_filter/chain.rb:9:in `run' | |
| (eval):4:in `block in root_path' | |
| (eval):4:in `root_path' |
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
| new Ajax.request(YOUR_URL_HERE, { | |
| method: 'get', | |
| onSuccess: function(response) { | |
| new S2.UI.Autocompleter('autocompleter2', { | |
| choices: response.responseJSON.map(function(o) { return o.client }), | |
| choiceAttribute: 'name', | |
| listTemplate: new Template('#{text} <em>(#{object.login})</em>') | |
| }, | |
| onFailure: function(response) { | |
| // Handle failure here |
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 url_escape(string) | |
| string.gsub(/([^ ;\/?:@=#&a-zA-Z0-9_.-]+)/n) do | |
| '%' + $1.unpack('H2' * $1.size).join('%').upcase | |
| end.tr(' ', '+') | |
| end |
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
| var countdown = (function() { | |
| var index; | |
| function log(){ | |
| console.log(index); | |
| } | |
| function iterate(){ | |
| log(); | |
| if(index>1) setTimeout(iterate, 1000); |
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
| // Example call for functional version: | |
| function logCar(object) { | |
| return "I'm a " + object.color + " " + object.make | |
| } | |
| logCar({ color: 'blue', make: 'BMW' }); | |
| // Example call for OO version: | |
| var Car = function(make, color) { | |
| this.make = make; |
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
| var Math2 = function() { | |
| function sin(num) { | |
| console.log('Compute'); | |
| return Math.sin(num); | |
| } | |
| return { | |
| sin: sin | |
| } | |
| }(); |
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
| <div id="the_div"> | |
| <ul id="the_list"> | |
| <li id="the_item">Click me!</li> | |
| </ul> | |
| </div> | |
| <p id="log"></p> | |
| <script type="text/javascript" charset="utf-8"> | |
| function log(string){ |
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
| config.status: creating arm-linux-eabi-fake.rb | |
| executable host ruby is required. use --with-baseruby option. | |
| make: *** [.rbconfig.time] Error 1 |
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
| (function() { | |
| var gs = document.createElement('script'), gsc = document.createElement('div'), interval; | |
| gs.type = 'text/javascript'; gs.async = true; gsc.id = 'getsatisfaction'; | |
| gs.src = document.location.protocol + '//s3.amazonaws.com/getsatisfaction.com/javascripts/feedback-v2.js'; | |
| (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gs); | |
| (document.getElementsByTagName('body')[0]).appendChild(gsc); | |
| interval = setInterval(function() { | |
| if (window.GSFN !== undefined) { | |
| new GSFN.feedback_widget({ |
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
| CREATE TABLE `users` ( | |
| `id` int(11) DEFAULT NULL, | |
| `email` varchar(255) CHARACTER SET latin1 DEFAULT NULL, | |
| `born_at` varchar(255) CHARACTER SET latin1 DEFAULT NULL | |
| ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | |
| INSERT INTO `users` (`id`,`email`,`born_at`) VALUES ('1','[email protected]','1980-01-01'); | |
| INSERT INTO `users` (`id`,`email`,`born_at`) VALUES ('2','[email protected]','1980-01-02'); | |
| INSERT INTO `users` (`id`,`email`,`born_at`) VALUES ('3','[email protected]','1980-01-01'); | |
| INSERT INTO `users` (`id`,`email`,`born_at`) VALUES ('4','[email protected]','1980-01-03'); |