Skip to content

Instantly share code, notes, and snippets.

View Merovex's full-sized avatar

Ben W Merovex

  • Gainfully Employed
  • In a hidden bunker under a non-descript building
  • 03:02 (UTC -04:00)
View GitHub Profile
@Merovex
Merovex / send_to_kindle.rb
Created April 15, 2024 11:25 — forked from wndxlori/send_to_kindle.rb
When you have a whole LOT of ebooks to send to your Kindle
#!/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
@Merovex
Merovex / Gemfile
Created January 24, 2021 04:02 — forked from dhh/Gemfile
HEY's Gemfile
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
@Merovex
Merovex / Gemfile
Created January 24, 2021 04:02 — forked from dhh/Gemfile
HEY's Gemfile
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
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;
export default function parseToMarkdown(chunk) {
let children = !chunk.type
? chunk.text
: chunk.children.map(c => parseToMarkdown({ ...c, parentType: chunk.type })).join('');
if (children === '') return;
// formatting
if (chunk.bold) {
children = `**${children.trim()}** `;
@Merovex
Merovex / Commit Formatting.md
Created July 11, 2019 21:58 — forked from brianclements/Commit Formatting.md
Angular Commit Format Reference Sheet

Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the AngularJS change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

@Merovex
Merovex / config.yml
Created October 9, 2017 15:06 — forked from retrage/config.yml
config.yml for Latex on Circle CI 2.0
version: 2
jobs:
build:
docker:
- image: paperist/alpine-texlive-ja
steps:
- run:
name: Installing dependancies
command: |
apk add --update git patch curl
@Merovex
Merovex / gist:16b584a1cfab090d2b81fefb14987ed7
Created December 2, 2016 02:06 — forked from kaizhu256/gist:4482069
javascript - very fast and simple uuid4 generator benchmarked on http://jsperf.com/uuid4/8
/*jslint bitwise: true, indent: 2, nomen: true, regexp: true, stupid: true*/
(function () {
'use strict';
var exports = {};
exports.uuid4 = function () {
//// return uuid of form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
var uuid = '', ii;
for (ii = 0; ii < 32; ii += 1) {
@Merovex
Merovex / git-wars.md
Created October 15, 2016 16:01 — forked from juderosen/git-wars.md
Git Wars: GitHub vs Bitbucket

Git Wars: GitHub vs Bitbucket

Introduction

Now, you might think the answer I'm going to give you is already obvious because I'm using GiHub right now, but it's not. Both GitHub and Bitbucket offer great Git services, but each has its own features and pricing plans. In the following... thing, I'm going to compare the two and then offer a final solution that should work for most people.

TL;DR: Both. Use GitHub for open source and public repos (you'll spend most of your time here) and Bitbucket for private repos. But, sign up for GitHub first, then import account into Bitbucket. Also, check comments for updates. P.S. I personally prefer GitHub.

Interface and Functionality

@Merovex
Merovex / README.md
Last active August 29, 2015 14:13 — forked from magnetikonline/README.md

Create favicon.ico from PNG source using ImageMagick

Using a source PNG image with dimensions of 144x144, which will be our apple-touch-icon used for Apple iOS and tablet devices.

$ convert -resize 32x32 -colors 256 favicon.png favicon.ico

Markup for HTML page <head> area: