Code Snippets

Linux Incremental Backups To AWS S3 Using Restic
Bash script to perform incremental encrypted backups of linux files to AWS S3 using restic and cron

Backup libvirt Domains Using virtnbdbackup
Bash script to backup Libvirt domains using virtnbdbackup on cron

Merge Git Repository as Subdirectory
Add a git respostory into an another git repository while keeping commit history

Substitute Values in Files Using sed
Find files in directory recursively and substitute values using sed

Targeted Firefox CSS
Apply CSS Rule To Firefox Only

Dynamically select SSH or HTTPS in Gemfile git_source
If valid key added to `ssh-agent`, use SSH for custom Gemfile `git_source`, else fallback to HTTPS

Set CSS `box-sizing` Property Globally
Change the default CSS `box-sizing` property value to help developer intuition

Decrypt Rails v4.2 Session Cookie
Ruby script to decrypt and debug encrypted Rails cookies

AWS S3 Public Permissions Policy
Basic public access policy for objects in AWS S3 bucket.

Ruby on Rails Docker CMD Startup Script
Docker CMD startup script to create or migrate database then start the application server

Check if Ruby On Rails Database Exists Using Rake
Rake task which uses ActiveRecord to check if Ruby on Rails database exists i.e. has been created and is accessible

AWS S3 Open CORS Policy
Basic open Cross-origin resource sharing (CORS) policy for AWS S3 bucket

Linux Directory Backup to AWS S3
Compress, encrypt, and backup a Linux directory to AWS S3 using cron.

Mobile First Responsive Design Breakpoints SASS Mixin
SASS @mixin to add responsive design breakpoints to CSS rules

Zsh - Auto Select Node Version
Automatically Select Nodejs Version in Zsh Shell Using 'n'

Rails Human Friendly Resource URIs
Create Human Readable URIs for Ruby on Rails Models

CircleCI Automerge Github PR
Automatically Merge Successful GitHub Pull Requests on CircleCI

Travis-CI Auto-Deploy to Kubernetes
Automatically apply updated Kubernetes config to control plane using Travis-CI

Travis-CI Docker Build and Publish
Automatically build and publish application container image to dockerhub using Travis-CI

Travis-CI GitHub PR Automerge
Automatically merge successful GitHub pull requests on TravisCI

Hello World
The classic