Skip to content

Instantly share code, notes, and snippets.

@EmberLightVFX
EmberLightVFX / main.py
Created July 19, 2023 09:48
Search and replace for OpenPype's MongoDB
import re
from pymongo import MongoClient
# Connect to the MongoDB server
client = MongoClient("mongodb://mongodb://localhost:27017")
# Select the desired database and collection
db = client["avalon"]
collection = db["your-project-name"]
@Egor-Skriptunoff
Egor-Skriptunoff / win-125x.lua
Created May 22, 2021 22:44
String converter between Windows ANSI and UTF-8 encodings
---------------------------------------------------------------------
-- Converter between win-125x and UTF-8 strings
---------------------------------------------------------------------
-- Written in pure Lua, compatible with Lua 5.1-5.4
-- Usage example:
-- require("win-125x")
-- str_win = utf8_to_win(str_utf8)
-- str_utf8 = win_to_utf8(str_win)
---------------------------------------------------------------------
@okken
okken / mcd.bash
Last active October 10, 2020 05:17
mcd: menu driven cd (intended for .bashrc)
# mcd: menu driven cd (intended for .bashrc)
function mcd {
PS3="Which directory: "
select d in '/some/common/path/i/use/'\
'/another/common/path/'\
'/and/so/forth/'
do
cd $d
break
@havchr
havchr / operator_whitebox_fbx_export.py
Last active February 9, 2023 03:01
A blender export plugin that exports a collection named Export with FBX_SCALE_UNITS
import bpy
#This blender plugin will export everything in a collection named Export with fbx format with FBX scale.
#You can adjust to your needs for options - usefull for making sure you have consistent
#export settings for your FBXs and an easy way to reach them. I suggest you add it to quick shortcuts as well.
#I just press q->export and enter and then I have exported a new version.
bl_info = {
"name": "Export whitebox mesh",
"blender": (2, 80, 0),
"category": "Exporter",
@fworks
fworks / install-zsh-windows-git-bash.md
Last active June 26, 2024 17:26
Zsh / Oh-my-zsh on Windows Git Bash
$ git clone https://git.samba.org/samba.git
$ brew install jansson
$ brew install readline && brew link --force readline
$ cpan # then w/in cpan install Parse::Yapp module (might be 'install Term::Parse::Yapp')
$ brew intsall libarchive
$ export LDFLAGS="-L/usr/local/opt/libarchive/lib"
$ export CPPFLAGS="-I/usr/local/opt/libarchive/include"
$ ./configure --prefix=/opt/samba --without-ad-dc --without-acl-support
@eviltester
eviltester / gist:7beef92896fdd8b638656f996fac38c0
Last active September 28, 2023 15:12
Convert videos into subtitled sections using ffmpeg
# Create a new caption file
~~~~~~~~
ffmpeg -i captions.srt captions.ass
~~~~~~~~
# Add subtitles to main video without changing it
~~~~~~~~
ffmpeg -i video.mp4 -vf "subtitles=captions.ass:force_style='OutlineColour=&H80000000,BorderStyle=4,Outline=1,Shadow=0,MarginV=20'" subtitled-video.mp4
@iamalbert
iamalbert / README.md
Last active November 30, 2023 22:39
Git skip LFS on local repo

Because GitKraken and SourceTree are FUCKING SLOW for repo with large LFS objects.

Need to completely skip LFS operation when pull/fetch/checkout/...

Skip downloading when clone

GIT_LFS_SKIP_SMUDGE=1 git clone SERVER-REPOSITORY

Skip downloading when fetch/checkout/pull

@Tomasvrba
Tomasvrba / 360TimelapseTutorial.md
Last active December 17, 2022 22:18
HD 360° Timelapse and FFmpeg tutorial

How to capture, stitch and publish a 360° timelapse

Consumer ready 360° cameras are becoming ever more accessible and many people are experimenting with a variety of 360° content. Out of the many cameras on the market the Ricoh Theta S is one of the most user-friendly, turn-key solutions with lots of built-in features. However, the camera's videos are limited 1920x960 resolution and the Theta+ app only lets you create a timelapse with up to 300 or 400 images. The workaround is to use interval shooting to capture as many images as you'd like at the 5376x2688 to full resolution and then stitch them together manually into an HD video. There are few GUI solutions (especially open-source/free) which let you do this with ease. Here's how you do it:

Set up interval shooting on your Ricoh Theta S

@AndrewHazelden
AndrewHazelden / Copy to Clipboard.lua
Created March 13, 2017 09:47
A Blackmagic Design Fusion LUA script example to copy items into the clipboard using xclip (Linux), clip (Windows), and pbcopy (macOS)
------------------------------------------------------------------------------
-- Copy to Clipboard Script for Fusion - 2017-03-13 06.27 AM
-- by Andrew Hazelden
-- www.andrewhazelden.com
-- andrew@andrewhazelden.com
------------------------------------------------------------------------------
-- Display the extra debugging verbosity detail in the console log
printStatus = true
-- printStatus = false