Skip to content

Instantly share code, notes, and snippets.

@handcoding
handcoding / Ashley’s Light Fader.yaml
Last active March 29, 2024 13:32
This script for Home Assistant will fade a lamp over time with your choice of easing, including varieties of ease-in, ease-out, and ease-in-out.
alias: Ashley’s Light Fader
description: >
Fades a lamp over time. If you have any questions or comments about this
script, feel free to tweet Ashley Bischoff at @FriendlyAshley. Released under
the Apache 2.0 license. (v2.0)
fields:
light:
name: 💡 Light
description: entity_id of the lamp.
selector:
@allsey87
allsey87 / python_plugin.rs
Last active March 29, 2024 13:32
Integrating RustPython into a Bevy App
use bevy::prelude::{AppBuilder, Entity, With, World};
use bevy::ecs::system::IntoExclusiveSystem;
use rustpython_vm::{self as vm, builtins::PyCode, PyRef, scope::Scope};
pub(crate) struct PythonPlugin;
pub(crate) struct Script(pub String);
fn compile(world: &mut World) {
let interpreter = world
@xero
xero / irc.md
Last active March 29, 2024 13:30
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@etuttle
etuttle / docker-registry-caching-proxy.conf
Created February 14, 2017 23:54
NGINX config for a caching proxy that sits in front of a docker registry
upstream docker-mirror-upstream {
server upstream.example.com;
}
proxy_cache_path /var/lib/docker-mirror/cache levels=1:2 max_size=10g inactive=48h keys_zone=cache:10m;
server {
listen 80 default_server;
listen 443 ssl default_server;
@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/* .