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/ruby | |
require 'rubygems' | |
require 'github/markup' | |
if ARGV.length == 1 | |
f = GitHub::Markup.render(ARGV[0]) | |
puts f | |
else | |
raise "Usage: markup <source_file> [ > <destination_file> ]" | |
end |
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
# too much stuff to camelize the json object keys | |
# so that they are ready for the templates | |
def camelized(emp) | |
puts emp.inspect | |
if emp.is_a?(Array) | |
new = [] | |
emp.each {|e| new << camelize_keys(e)} | |
else | |
new = camelize_keys(emp) |
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/ruby | |
######################### | |
# | |
# Convert rubycode with 4-space indents | |
# to regulation 2-space indenting format. | |
# | |
# supply directory as argument: | |
# > ruby indentity_correction.rb ./my_code_dir | |
# |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjUroth5dd9SB+U8SuAKnmGgrDPeHGFFwqAXKeNJ+wht6mVXLipDs01eVii3a7Ibkalh2v45+KleiQoXXYhaLuvuq1KskGU7lv5bJUcQWicoBWh/OtrrzmWHlsesq1EDXjqDL0bgm2sQ+efO5G1qnBhwZ7PNXH6CHb8ayuySk8m4N0R/8Sn188LwAdFy2jgcAWuOM8wXACK41JaH38HwMsgrjIphCoxZbAYtufa+wkqztEs546wBk6vDJn46J432LhxXuN5TY9BV043qLQl3Y9RDkRk5Siq63a3vioKYWsqlxIbiN0FAae9S6Klg0pVZYDsJajyYycMIJlGvAx7AGt |
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
def calculate_downtime_minutes | |
check_id = 387085 | |
user = "[email protected]" | |
pass = "***" | |
key = "***" | |
today = DateTime.now.to_date | |
last_sunday = today - today.wday |
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
function encode52(c) { | |
return (c < 52 ? '' : encode52(parseInt(c / 52))) + ((c = c % 52) > 25 ? String.fromCharCode(c + 39) : String.fromCharCode(c + 97)); | |
}; |
NewerOlder