Skip to content

Instantly share code, notes, and snippets.

@timborrelli
timborrelli / ExportFBX.py
Last active March 29, 2024 13:25
FBX Animation Exporter from Mesh Selection
import maya.cmds as cmds
import os as os
import maya.mel as mel
# Description
# This tool will export selected mesh(es) as an FBX
# It will name each export the same as the Maya file you export from, but with the character's namespace replacing the first part of the file name.
# File naming is expected to be "<name of character>_alltheothershit.extension" like "male_idleToWalk.ma"
@I-Al-Istannen
I-Al-Istannen / .gitignore
Last active March 29, 2024 13:24
[WIP] DBS summaries
Ü?_T?.md
@vijayanant
vijayanant / Lambda.md
Last active March 29, 2024 13:23
Lambda Calculus - Church Numerals and Basic Operations

My notes on Lambda Calculus.

Introduction

The syntax of the lambda-calculus comprises just three sorts of terms.

  • A variable x by itself is a term;
  • The abstraction of a variable x from a term t1, written λx.t1, is a term;
  • And the application of a term t1 to another term t2, written t1 t2, is a term.

These ways of forming terms are summarized in the following grammar.

@lukeplausin
lukeplausin / transfer_ssm_file.sh
Last active March 29, 2024 13:26
Transfer a file to EC2 SSM instance without using S3 (SSM only)
# This script will explain how to transfer a file to EC2 using SSM ONLY!
# You will need to have permission to run SSM commands on the target machine and have sudo access as well
# Infos
INSTANCE_ID=i-1234567890
FILE_NAME=the_file.tar.gz
# Step 1: Run command on machine to install netcat and dump from port to filename
# < Start session
@vladstudio
vladstudio / llm.sh
Last active March 29, 2024 13:21
Raycast LLM custom script
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title LLM
# @raycast.mode fullOutput
# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "text", "placeholder": "Prompt" }
@lucataco
lucataco / ollama_fast_speech_text_speech.py
Last active March 29, 2024 13:17
speech to text to speech using Ollama
""" To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory
brew install portaudio
brew install git-lfs
git lfs install
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
@hcrub
hcrub / HCClassAddIvar.m
Created November 7, 2013 17:42
Objective C Runtime's class_addIvar adding a new instance variable to a class
/**
* class_addIvar
* Adds a new instance variable to a class.
*
* BOOL class_addIvar(Class cls, const char *name, size_t size, uint8_t alignment, const char *types)
*
* Return Value
* YES if the instance variable was added successfully, otherwise NO.
**/
@SeanFree
SeanFree / clamp.js
Created December 18, 2020 16:51
JavaScript clamp function
// Returns a range-limited number {n} between {min} and {max}
// @param {number} n - Current Value
// @param {number} min - Minimum Value
// @param {number} max - Maximum Value
// @returns {number}
export const clamp = (n, min, max) =>
Math.min(Math.max(n, min), max)
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active March 29, 2024 13:15
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@nico-lab
nico-lab / hevc_nvenc.txt
Last active March 29, 2024 13:14
ffmpeg -h encoder=hevc_nvenc
Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
General capabilities: dr1 delay hardware
Threading capabilities: none
Supported hardware devices: cuda cuda d3d11va d3d11va
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 bgra rgb0 rgba x2rgb10le x2bgr10le gbrp gbrp16le cuda d3d11
hevc_nvenc AVOptions:
-preset <int> E..V....... Set the encoding preset (from 0 to 18) (default p4)
default 0 E..V.......
slow 1 E..V....... hq 2 passes
medium 2 E..V....... hq 1 pass