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
| / HAML's syntax sucks for HTML5 data attrs when used as extensively | |
| / as they currently are by trendy JS frameworks. | |
| #content{ :'data-role' => 'application' } | |
| #header | |
| ul.navigation{ :'data-role' => :toolbar } | |
| li.navigation{ :'data-transition' => :fade } Link 1 | |
| li.navigation{ :'data-transition' => :bounce } Link 2 | |
| #main{ :'data-role' => :window } | |
| Hello World |
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
| navlink: | |
| data-transition: fade | |
| sidebar: | |
| data-role: sidebar | |
| data-transition: slide | |
| data-position: left | |
| # ... |
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
| module Tournament | |
| class BaseTournament < ActiveRecord::Base | |
| end | |
| class KOTHTournament < BaseTournament | |
| include Bracket::KOTH | |
| end | |
| class SwissTournament < BaseTournament | |
| include Bracket::Swiss |
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
| Your Tournament Request has been approved. An approval email has been sent to you at [email protected]. |
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
| # Give it two procs to compare | |
| def bm(o, n); reload!; puts "Running 10 times"; Benchmark.bmbm(10) { |x| x.report('Old Query:') { @olr = o.call }; x.report('New Query:') { @nr = n.call } }; reload!; puts 'Old Result:' ; table(@olr); puts 'New Result'; table(@nr); 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
| git rm -f `git status | awk '/not staged/,0' | grep deleted | sed 's/# deleted: //'` |
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
| user logankoester logankoester; | |
| worker_processes 2; | |
| events { | |
| worker_connections 2048; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; |
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 fetch_github_trending_repos = function() { | |
| var scraper = require('scraper'); | |
| var repos = []; | |
| scraper('https://github.com/explore', function(err, jQuery) { | |
| if (err) {throw err} | |
| jQuery('.ranked-repositories li h3').each(function() { | |
| repos.push 'https://github.com/' + jQuery(this).text().trim().replace(/\s/g, ''); | |
| }); | |
| }); | |
| return(repos); |
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
| " Factories and Configuration | |
| Rnavcommand config config -suffix=.yml -default=application | |
| Rnavcommand factory spec/factories test/factories -suffix=.rb -default=model() | |
| " Backbone | |
| Rnavcommand bmodel app/assets/javascripts/backbone/models -suffix=.coffee -default=model() | |
| Rnavcommand bview app/assets/javascripts/backbone/views -suffix=.coffee | |
| " Apotomo Widgets (Cells) | |
| Rnavcommand widget app/widgets -suffix=_widget.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
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> | |
| <script type="text/javascript" src="https://raw.github.com/andyet/ICanHaz.js/master/ICanHaz.min.js"></script> | |
| <script type="text/javascript"> | |
| var add_info = function(data){ | |
| var parsedData = $.map(data, function(item){ | |
| var keys = $.map(item, function(k, v){return({name: v})}); | |
| return({'keys': keys}); | |
| }); |