Skip to content

Instantly share code, notes, and snippets.

View Kjue's full-sized avatar

Mikael Lavi Kjue

View GitHub Profile
@gmolveau
gmolveau / envsubst.sh
Last active November 15, 2024 06:59
envsubst alternative in pure bash - replace prefixed environment variables (eg. ${XX_MYVAR}) in a text file
#!/bin/bash
usage() {
echo "Usage: $0 [OPTIONS] [file_path]"
echo "OPTIONS:"
echo " -p, --prefix PREFIX Specify the prefix for environment variables"
echo " -h, --help Show this help message"
echo "If no file_path is provided, the script reads from stdin."
exit 1
}
@bryanbraun
bryanbraun / git-branching-diagram.md
Last active April 27, 2025 17:30
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@scribu
scribu / FCP_KeyPreset.py
Created October 28, 2014 12:59
Final Cut Pro Key layout for Blender 2.7.2 (initial version from http://processdiary.com/video-editing-in-blender-introduction/)
import bpy
import os
wm = bpy.context.window_manager
kc = wm.keyconfigs.new(os.path.splitext(os.path.basename(__file__))[0])
# Map View2D
km = kc.keymaps.new('View2D', space_type='EMPTY', region_type='WINDOW', modal=False)
kmi = km.keymap_items.new('view2d.scroller_activate', 'LEFTMOUSE', 'PRESS')