Skip to content

Instantly share code, notes, and snippets.

View toroidal-code's full-sized avatar

Katherine Whitlock toroidal-code

  • New York
View GitHub Profile
#!/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
require 'nokogiri'
require 'open-uri'
def next_node_with(current, attribute, cond)
while current && current.send(attribute) != cond
current = current.next
end
current
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...'
;; 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