Skip to content

Instantly share code, notes, and snippets.

View peanutbutterandcrackers's full-sized avatar

peanutbutterandcrackers

View GitHub Profile
@atweiden
atweiden / guix-notes.md
Created March 14, 2016 19:26
Guix notes

guix notes

overview

  • guix is pronounced geeks
  • guix wants linux-libre kernel for containerization
  • changing any input to a guix package definition results in a different hash on disk (different directory)
@blacklee
blacklee / ffmpeg-to-480p.sh
Created February 19, 2016 13:43
ffmpeg convert video to 480p
ffmpeg -i input.mp4 -s hd480 -c:v libx264 -crf 23 -c:a aac -strict -2 output.mp4
@NoobStuff
NoobStuff / rock_paper_scissors.py
Created December 30, 2015 07:06
rock paper scissors (lizard spock) noob project
import random
RED = '\x1b[31m'
YELLOW = '\x1b[33m'
GREEN = '\x1b[32m'
RESET = '\x1b[0m'
class RPS(object):
# Move : Counter
regular_moves = {
@max-mapper
max-mapper / readme.md
Last active January 31, 2025 03:52
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@Nilpo
Nilpo / Installing The Sword Project.md
Last active June 19, 2024 05:23
Instruction for installing The Sword Project on Mac and Linux. This is intended for module developers.

Installing The Sword Project

I found installing Sword from source to be problematic on both Mac and Linux. Thankfully, I found hidden in some documentation that it is available through common repositories. Unfortunately, the documentation was not thorough. Here's what worked for me on Mac OSX 10.9.5 and Linux Mint 17.3 "Rosa". These instructions should work on any recent version of Mac and any flavor of Ubuntu.

Installing Sword Package

The process for installing Sword differs a bit between Mac and Linux. I used Homebrew on Mac, but MacPorts should work just fine. Linux was a little less friendly, but I did get it working.

Instructions for Mac Users

@kuntau
kuntau / yify.md
Last active April 1, 2025 01:11
YIFY's Quality Encoding

For those that want to keep the YTS going (No, IDGAF about people that don't care for YTS quality) get HandbrakeCLI https://handbrake.fr/downloads... and use the following settings:

user@user:~$HandBrakeCLI -i /file/input.mp4 -o /file/out.mp4 -E fdk_faac -B 96k -6 stereo -R 44.1 -e x264 -q 27 -x cabac=1:ref=5:analyse=0x133:me=umh:subme=9:chroma-me=1:deadzone-inter=21:deadzone-intra=11:b-adapt=2:rc-lookahead=60:vbv-maxrate=10000:vbv-bufsize=10000:qpmax=69:bframes=5:b-adapt=2:direct=auto:crf-max=51:weightp=2:merange=24:chroma-qp-offset=-1:sync-lookahead=2:psy-rd=1.00,0.15:trellis=2:min-keyint=23:partitions=all

Reason to use CLI over GTK has to do with lack of support for advanced settings for Handbrake GTK

** Don't Re-encode already shitty encodes...get good source!**

@leotac
leotac / fork_subdir.sh
Last active October 11, 2019 20:15
Create new repo from subdirectory
mkdir subdir-fork
cd subdir-fork
git clone [email protected]:sbebo/REPO.git
git filter-branch --prune-empty --subdirectory-filter <SUBFOLDER> master
git remote -v
git remote rm origin
git remote add origin [email protected]:sbebo/<NEWREPO>.git
#!/usr/bin/env python
# Tutorial available at: https://www.youtube.com/watch?v=nmb-0KcgXzI
# Feedback welcome: [email protected]
from gimpfu import *
def NAME_OF_MAIN_FUNCTION(image, drawable):
# function code goes here...
@glombard
glombard / combine.py
Created November 24, 2014 00:22
Merging 4 images into one with Python and PIL/Pillow
# Combine multiple images into one.
#
# To install the Pillow module on Mac OS X:
#
# $ xcode-select --install
# $ brew install libtiff libjpeg webp little-cms2
# $ pip install Pillow
#
from __future__ import print_function

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am