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 'mail' | |
require 'fileutils' | |
# Check if a command line argument is provided | |
if ARGV.length < 1 | |
puts "Usage: ruby send_to-kindle.rb <directory containing epub files>" | |
exit 1 |
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
# frozen_string_literal: true | |
module Slug | |
extend ActiveSupport::Concern | |
def self.included(base) | |
base.extend ClassMethods | |
base.before_create :set_slug | |
end | |
def to_param |
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
zucchini zoology zoologist zoo zone zombie zither zipper zinc ziggurat zero zephyr zen zebrafish zebra zampone yurt yoyo youth yourself youngster young yolk yoke yogurt yoga yin yew yesterday yellowjacket yellow yeast year yawl yarn yarmulke yard yang yam yak yahoo yacht xylophone wrong writing writer wrist wrinkle wriggler wrestler wrench wren wrecker wreck wrapping wrapper wraparound wrap wound worth worshiper worship worry worm world workshop workplace workout working workhorse workforce worker workbench work wording word woolens wool woodwind woodshed woodland woodchuck wood wont wonder wombat woman wolf wok witness withdrawal witchhunt witch wit wisteria wish wiseguy wisdom wiring wiretap wire winter winner wink wingtip wingman wing winery wine windshield windscreen window windchime windage wind win willow willingness will wildlife wildflower wilderness wildebeest wild wife width widow widget wick whorl wholesaler wholesale whole white whistle whisper whiskey whisker whirlwind whirlpool whip whey whelp w |
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
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
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
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
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
CREATE TABLE `states` ( | |
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, | |
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, | |
`code` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, | |
`created_at` timestamp NULL DEFAULT NULL, | |
`updated_at` timestamp NULL DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | |
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
// font-family: Cambria, Georgia, "Times New Roman", Times, serif; | |
// Noto Serif found on modern Android and many Linux distros. | |
// Times is Mac OS | |
// Georgia is a classic serif font that I have seen leading this everywhere. | |
$font-family-sans-serif: Cambria, Georgia, "Noto Serif", "Times New Roman", Times, serif; |
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 pow($base, $exponents) { | |
$raised: 1; | |
@for $i from 1 through $exponents { | |
$raised: $raised * $base; | |
} | |
@return $raised; | |
} | |
@function luma($color){ | |
// Thanks voxpelli for a very concise implementation of luminance measure in sass | |
// Adapted from: https://gist.github.com/voxpelli/6304812 |
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
puts "\nCreating Table of Contents" | |
# This TOC generator assumes you don't care to include the page header | |
toc = "## Contents\n\n" + content.scan(/^##\s?(.*)\n/iu).flatten.map do |header| | |
next if header == 'Contents' | |
indent = " " * header.count("#") | |
anchor = header.downcase.gsub(/\W+/,'-').chomp('-') | |
"%s* [%s](#%s)\n" % [indent,header,anchor] | |
end.join |
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
{ | |
"extensions.showRecommendationsOnlyOnDemand": true, | |
"editor.tabSize": 2, | |
"editor.renderWhitespace": "boundary", | |
"editor.wordWrap": "wordWrapColumn", | |
"editor.mouseWheelZoom": true, | |
"editor.tabCompletion": "on", | |
"editor.fontFamily": "'Fira Code', Consolas, 'Courier New', monospace", | |
"editor.fontSize": 16, | |
"editor.fontWeight": "400", |
NewerOlder