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 | |
| # frozen_string_literal: true | |
| # Rename batch-downloaded music files (obviously acquired in a lawful manner as a righteous | |
| # citizen who believes strongly in the Free Market, the Invisible Hand, and the Capitalism | |
| # Gods). | |
| # | |
| # This class assumes certain points: | |
| # | |
| # 1. All the files pertain to the same artist or collection — _i.e._ OST; |
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
| require 'jekyll' | |
| conf = Jekyll.configuration({ | |
| 'source' => 'path/to/source', | |
| 'destination' => 'path/to/destination' | |
| }) | |
| Jekyll::Site.new(conf).process |
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
| // Color List from https://material.io/design/color/ | |
| // ================================================= | |
| // If a color is followed by HC, it contrasts better | |
| // with a light color. | |
| // Reds | |
| $Red50 : #FFEBEE; | |
| $Red100 : #FFCDD2; | |
| $Red200 : #EF9A9A; | |
| $Red300 : #E57373; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title></title> | |
| <link href="style.css" rel="stylesheet" /> | |
| </head> | |
| <body> |
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
| require 'base64' | |
| if ARGV.length > 0 | |
| #To64Html.new(ARGV[0]).html() | |
| ARGV.each do |arg| | |
| puts "Enconding file: " + arg.to_s | |
| img = File.open(arg, 'rb') | |
| encoded = 'data:image/png;base64,' + Base64.encode64(img.read).gsub(/\n/m, "") | |
| enfile = arg.gsub(/\.png|jpg|jpeg|gif/, ".txt") | |
| File.open(enfile, 'w:UTF-8') { |file| file.write(encoded) } |
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
| @import url('https://fonts.googleapis.com/css?family=Libre+Baskerville:700|Noto+Sans:400,400i,700,700i&display=swap'); | |
| @import url('https://cdn.materialdesignicons.com/3.6.95/css/materialdesignicons.min.css'); | |
| *, tw-story, tw-passage { | |
| font-family: 'Noto Sans', 'Myriad Pro', Calibri, Helvetica, Arial, sans-serif; | |
| text-align: justify; | |
| color: #000000; | |
| } | |
| em { |
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
| <!DOCTYPE html> | |
| <html> | |
| <!-- | |
| Original code by Ruslan at | |
| https://codepen.io/kybarg/pen/PqaOOg | |
| --> | |
| <head> | |
| <title>getMDL File Select Example</title> |
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
| # Gets the number of lymphocytes from the WBC count. | |
| puts "Absolute LYMPHOCYTE count:" | |
| $lymph = gets.to_i | |
| puts "Relative lymphocyte proportion:" | |
| $lym_prop = gets.to_f / 100.0 | |
| puts "" | |
| # Limits of absolute normality | |
| $min_lim = 900 |
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
| require 'date' | |
| DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] | |
| # This method takes a date in the string format "DD/MM/YYYY" and returns | |
| # a Time object. | |
| def birthday_timestamp_time(date) | |
| birthday = date.split('/') | |
| Time.new(birthday[2], birthday[1], birthday[0]) | |
| end |