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 April 7, 2025 09:56
Set up a Ubuntu server to deploy Kamal 2.x Docker containers to, hardened security and production ready
#!/bin/bash
# Production Docker Host Hardening Script v2
# For Ubuntu Server 24.04 LTS (Noble)
# Suitable for both Kamal deployment and builder hosts
set -euo pipefail
IFS=$'\n\t'
# --- Constants ---
#!/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 16, 2025 22:43
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 April 1, 2025 01:48
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: