Skip to content

Instantly share code, notes, and snippets.

View faun's full-sized avatar
🌵

Faun faun

🌵
View GitHub Profile
@faun
faun / COMMIT_EDITMSG
Created April 16, 2025 22:53 — forked from lencioni/COMMIT_EDITMSG
Tim Pope's model commit message
Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
@faun
faun / Mermaid_on_Github_Examples.md
Created December 31, 2024 23:45 — forked from ChristopherA/Mermaid_on_Github_Examples.md
Mermaid on Github Examples

Mermaid on Github Examples

All of these diagrams are dynamically rendered during html display by Github, the images generated from text inside the Github-Flavored Markdown. None are static images. Mermaid support was released for Github on 2022-02-14

Pros & Cons:

  • Pro: You don't need to care about the layout.
  • Con: You cannot control the layout.

Notes:

  • Not all the features of Mermaid (in particular symbols B-->C[fa:fa-ban forbidden], hyperlink and tooltips) are supported by Github.
@faun
faun / character_set_and_collation.rb
Created October 21, 2024 17:30 — forked from tjh/character_set_and_collation.rb
Convert all Rails table column collation and character set
#!/usr/bin/env ruby
# Put this file in the root of your Rails project,
# then run it to output the SQL needed to change all
# your tables and columns to the same character set
# and collation.
#
# > ruby character_set_and_collation.rb
DATABASE = ''
@faun
faun / controller-gen.txt
Created March 31, 2022 22:53 — forked from jenting/controller-gen.txt
controller gen help
CRD
+groupName package
=<string> specifies the API group name for this package.
+kubebuilder:deprecatedversion type
marks this version as deprecated.
[warning=<string>]
@faun
faun / README.md
Created December 1, 2021 21:59 — forked from jonico/README.md
How to create an RDS database that is suitable for PlanetScale's import feature

MySQL on RDS configured for import to PlanetScale example

This folder contains an example Terraform configuration that deploys a MySQL database - using RDS in an Amazon Web Services (AWS) account - that is properly configured for PlanetScale's DB import feature.

It will make sure that the RDS database has the binlog exposed, gtid-mode set to ON and is using ROW-based replication. All these are pre-requisites for imports to work without zero downtime.

If you are going to write a lot of data in your database in a very short amount of time, don't forget the only manual step after the Terraform setup.

@faun
faun / Github Flavored Markdown.md
Created September 14, 2016 18:10 — forked from stevenyap/Github Flavored Markdown.md
Github Flavored Markdown cheatsheet

Github Flavored Markdown (GFMD) is based on Markdown Syntax Guide with some overwriting as described at Github Flavored Markdown

Text Writing

It is easy to write in GFMD. Just write simply like text and use the below simple "tagging" to mark the text and you are good to go!

To specify a paragraph, leave 2 spaces at the end of the line

Headings

Large Object Motions:
(
)
{
}
[[
[]
][
]]
[m
@faun
faun / steal.sh
Last active August 29, 2015 13:57 — forked from mislav/steal.sh
Download videos from youtube and add them to iTunes
#!/bin/sh
# Usage: steal <YOUTUBE-URL>
# Requirements: youtube-dl, ffmpeg
set -e
# strip the YouTube playlist
url="${1%%&*}"
if [ -z "$url" ]; then
echo "no URL given" >&2
@faun
faun / vim.rb
Created October 22, 2013 04:38 — forked from mgrouchy/vim.rb
Install with: brew install https://gist.github.com/faun/7095304/raw/1a08f9403196f9e493d8b7a037acff5ed9992348/vim.rb --enable-interp=python,ruby --with-features=big
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'https://vim.googlecode.com/hg/', :revision => '6c318419e331'
version '7.3.515'
def features; %w(tiny small normal big huge) end
def interp; %w(lua mzscheme perl python python3 tcl ruby) end