This file contains 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 | |
require 'highline/import' | |
require 'colorize' | |
l_tag_regex = /(^\[[\w-]+\]\s*|_-_THORA\s*)/ #/^\[[\w-]+\]\s*/ #Remove sub group tag. THORA gets a special case | |
t_tag_regex = /\s*\[\w{8}\]$/ # match [A71160AA]-formatted trailing tags (CRC32) | |
e_tag_regex = /((\[|\()(?!\d{4}\)).*?(\]|\)))/ # Don't match (year), but match [1080p,etc.] or (1080p, etc.); | |
# will also exclude match of [year) #TODO: Fix this | |
class Rename |
This file contains 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' | |
def next_node_with(current, attribute, cond) | |
while current && current.send(attribute) != cond | |
current = current.next | |
end | |
current |
This file contains 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 'octokit' | |
require 'colorize' | |
print 'GitHub username: ' | |
username = $stdin.gets.strip | |
repos = Octokit.repos(username, {type: 'public'}).map { |repo| repo['full_name'] } | |
puts 'Searching for license files...' |
This file contains 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 small self applicable scheme->llvm compiler. | |
;; , Tobias Nurmiranta | |
;; | |
;; -- To Use It -- | |
;; Reads scheme-code from standard input. | |
;; cat code.ss|mzscheme --script compile.ss|llvm-as -f -o=test.bc;lli test.bc | |
;; | |
;; The compiler is painfully slow since it for testing purposes | |
;; compiles all help functions as well (see variable bootstrap). | |
;; It extends standard scheme with a subset of available |
NewerOlder