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
| $.sammy(function() { | |
| this.helpers({ | |
| showModal: function() { | |
| $('.modal').show('slow'); | |
| }, | |
| hideModal: function() { | |
| $('.modal').show('slow'); | |
| } | |
| }); |
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 data = [1,2,3,4] | |
| var template = (<r><![CDATA[ | |
| <% for ( var i = 0; i < data.length; i++ ) { %> | |
| <% if(data[i] != 2 ){ %> | |
| <li><%= data[i] %></li> | |
| <% } %> | |
| <% } %> | |
| ]]></r>).toString(); | |
| console.log($.srender(template, data)); |
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
| # mac specific aliases ------------------------------------------ | |
| alias o='open . &' | |
| alias ff='open -a Firefox' | |
| alias m='mate' | |
| # other aliases ------------------------------------------ | |
| # utility | |
| alias c='clear' |
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
| # In Rails 3, I wanted to include some additional json values in my data for | |
| # the jquery ui autocomplete plugin. Overriding to_json() at the model level | |
| # seemed to work on a specific model instance, but not for a collection of | |
| # model instances. (pretty sure that worked in prior Rails versions) | |
| # Here's the working code: | |
| class PostsController < ApplicationController | |
| def index | |
| @posts = Post.all |
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 'rubygems' rescue nil | |
| require 'wirble' | |
| require 'pp' | |
| # load wirble | |
| Wirble.init | |
| Wirble.colorize | |
| IRB.conf[:AUTO_INDENT] = 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
| javascript:if(!document.getElementById('download-youtube-video')){var%20video_id=null;var%20video_hash=null;var%20video_player=document.getElementById('movie_player');if(video_player){var%20flash_variables=video_player.attributes.getNamedItem('flashvars');if(flash_variables){var%20flash_values=flash_variables.value;if(flash_values){var%20video_id_match=flash_values.match(/[^a-z]video_id=([^(\&|$)]*)/);if(video_id_match!=null)video_id=video_id_match[1];var%20video_hash_match=flash_values.match(/[^a-z]t=([^(\&|$)]*)/);if(video_hash_match!=null)video_hash=video_hash_match[1]}}}if(video_id==null||video_hash==null){var%20args=null;try{args=yt.getConfig('SWF_ARGS')}catch(e){}if(args){video_id=args['video_id'];video_hash=args['t']}}if(video_id!=null&&video_hash!=null){var%20div_embed=document.getElementById('watch-embed-div');if(div_embed){var%20div_download=document.createElement('div');var%20div_download_code='%3Cbr%20/%3E%3Cspan%20id=\'download-youtube-video\'%3E%3Ca%20href=\''+'http://www.youtube.com/get_video?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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Colors</key> | |
| <dict> | |
| <key>Background</key> | |
| <string>0.082 0.087 0.109</string> | |
| <key>InsertionPoint</key> | |
| <string>1.000 1.000 1.000</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
| Aydindril | |
| attack 286,27 any t:550,b:550 | |
| attack 287,26 any t:550,b:550 | |
| attack 288,27 any t:550,b:550 | |
| attack 289,28 any t:550,b:550 | |
| attack 290,28 any t:550,b:550 | |
| attack 287,24 any t:550,b:550 | |
| attack 290,24 any t:550,b:550 | |
| attack 291,24 any t:550,b:550 |
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
| # Scenario Outline: Viewing <user_count> users | |
| # Given I am a logged in admin | |
| # And there are <user_count> users | |
| # When I go to the admin users page | |
| # Then I should see the users | |
| # And I should not see "No users registered" | |
| # | |
| # Examples: | |
| # | user_count | | |
| # | 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
| require 'nokogiri' | |
| require 'open-uri' | |
| require 'stringex' | |
| require 'git' | |
| username = ARGV[0] | |
| repo = ARGV[1] | |
| base_url = "http://wiki.github.com/#{username}/#{repo}" |