Skip to content

Instantly share code, notes, and snippets.

View tjvr's full-sized avatar

Tim Radvan tjvr

View GitHub Profile
@Ghostbird
Ghostbird / build-ffmpeg-nvidia.sh
Last active January 26, 2024 22:42
Build FFMPEG with NVIDIA hardware accelleration libraries on Debian 12. Includes non-free libnpp!
#!/bin/bash
# Automatically compile and install FFMPEG with NVIDIA hardware acceleration on Debian 12
# Includes cuvid, cuda, nvenc, nvdec, and non-free libnpp
# Based on:
# https://www.tal.org/tutorials/ffmpeg_nvidia_encode
# https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/
# Abort on error
set -e

Best practices for PCB Design

Schematics

  • Power symbols should point upwards
  • Ground symbols should point downards
  • Sections should be labeled
  • Nets should generally not cross
  • Nets should be labeled
  • Either global or regular labels are fine
@lite
lite / thumb.py
Created February 5, 2013 09:48
Save scratch file(*.sb) to thumbnail.png
#!/usr/bin/env python
# coding=utf-8
# pip install kurt
# python thumb.py 3013900.sb
import sys
import kurt
from kurt.files import ScratchProjectFile, ScratchSpriteFile
@cyberhobo
cyberhobo / wpdump.bash
Created October 8, 2012 16:12
Bash alias for mysqldump using credentials from a wp-config.php file
#!/bin/bash
# one argument: the directory of a wp-config.php file
wpconfig=$1/wp-config.php
if [ ! -f "$wpconfig" ]; then
echo "$wpconfig not found."
exit
fi
@maccman
maccman / app.py
Created August 8, 2012 23:30
Stripe Flask Example
import os
from flask import Flask, render_template, request
import stripe
stripe_keys = {
'secret_key': os.environ['SECRET_KEY'],
'publishable_key': os.environ['PUBLISHABLE_KEY']
}
stripe.api_key = stripe_keys['secret_key']