Skip to content

Instantly share code, notes, and snippets.

View faun's full-sized avatar
🌵

Faun faun

🌵
View GitHub Profile
@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
class UsersController < ApplicationController
def create
@user = User.new params[:user]
return render 'new' unless @user.save
flash[:notice] = "The user was created succesfully"
redirect_to :index
end
class UsersController < ApplicationController
def create
@user = User.new params[:user]
return render 'new' unless @user.save
flash[:notice] = "The user was created succesfully"
redirect_to :index
end
#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Usage: provide a title argument."
exit -1
else
title="$@"
fi
d=$(date +"%Y-%m-%d")