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 | |
| abort('Procfile not found!') unless File.exists? 'Procfile' | |
| if ARGV.select { |a| a == 'only' || a == 'except' }.size > 1 | |
| abort('Invalid arguments') | |
| end | |
| if ARGV.first == 'only' | |
| @only = ARGV[1..-1] | |
| elsif ARGV.first == 'except' |
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 class_id(structure) | |
| if !structure.is_a?(Hash) && !structure.is_a?(Array) | |
| puts "#{structure}: #{structure.class}" | |
| return | |
| else | |
| structure.each { |e| class_id(e) } | |
| end | |
| 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
| task :convert_textile_to_markdown => :environment do | |
| require 'tempfile' | |
| WikiContent.all.each do |wiki| | |
| ([wiki] + wiki.versions).each do |version| | |
| textile = version.text | |
| markdown = convert_to_markdown textile | |
| puts "-- Changing the text of wiki ##{wiki.id} to:" | |
| puts markdown | |
| version.update_attribute(:text, markdown) | |
| 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
| set nosmoothscroll | |
| let blacklists = ["https://coolwanglu.github.io/*","http://typing.lk/*","https://niche.herokuapp.com/*","http://touchpianist.com/*","http://www.igorski.nl/*","http://mdp.tylingsoft.com/*","http://play.typeracer.com/*"] | |
| unmap B | |
| unmap b | |
| unmap J | |
| unmap K | |
| map J scrollFullPageDown | |
| map K scrollFullPageUp | |
| map b :buffer | |
| map B :bookmarks |