Skip to content

Instantly share code, notes, and snippets.

View krisdigital's full-sized avatar
πŸ‹

Krisdigital krisdigital

πŸ‹
View GitHub Profile
@rameerez
rameerez / kamal-production-server-setup.sh
Last active July 9, 2026 04:18
Set up a Ubuntu 24.04/26.04 server to deploy Kamal 2.x Docker containers to, hardened security and production ready
#!/bin/bash
# ─────────────────────────────────────────────────────────────────────────────
# Production Docker Host Setup & Hardening Script β€” v3.1.0
# For Ubuntu Server 24.04 LTS (Noble) and 26.04 LTS (Resolute)
# Suitable for both Kamal 2.x deployment hosts and remote builder hosts
#
# Part of RailsFast (https://railsfast.com) β€” free & open source, MIT licensed.
#
# Usage (as root, on a fresh server):
#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
if [ -z ${TM_PROJECT_DIRECTORY+x} ]; then
echo -n "$TM_FILEPATH" | pbcopy
echo "$TM_FILEPATH"'\n Absolute path copied to clipboard'
else
TM_PROJECT_DIRECTORY="$TM_PROJECT_DIRECTORY/"
echo -n "${TM_FILEPATH#$TM_PROJECT_DIRECTORY}" | pbcopy
@f000
f000 / Copy Current File Path.tmCommand
Created January 26, 2015 21:05
TextMate 2 – Copy current file path to clipboard
#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
echo -n "$TM_FILEPATH" | pbcopy
echo "Path $TM_FILEPATH copied to clipboard."
@felipecsl
felipecsl / restart coreaudio daemon
Last active March 2, 2026 20:24
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 17, 2026 19:56
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: