Skip to content

Instantly share code, notes, and snippets.

View PierceLBrooks's full-sized avatar
🇵🇸

Pierce Brooks PierceLBrooks

🇵🇸
View GitHub Profile
@smuralee
smuralee / install-ffmpreg-on-mac.sh
Created August 2, 2020 09:53
Install ffmpeg and convert mp4 to gif
# Install from Homebrew
brew install homebrew-ffmpeg/ffmpeg/ffmpeg
# Create the pallete file
ffmpeg -i screen-recording.mp4 -filter_complex "[0:v] palettegen" colour-pallete.png
# Convert the mp4 to gif
ffmpeg -i screen-recording.mp4 -i colour-pallete.png -r 12 -filter_complex "[0:v][1:v] paletteuse" screen-recording.gif
@m4ll0k
m4ll0k / jsbeautify.py
Last active September 4, 2023 06:45
Javascript Beautifier with Python
# by m4ll0k
# github.com/m4ll0k
import sys
try:
import jsbeautifier
import requests
except Exception as e:
sys.exit(print("{0}.. please download this module/s".format(e)))
@kumuji
kumuji / teapot.obj
Created May 4, 2020 20:59
utah teapot
v -3.000000 1.800000 0.000000
v -2.991600 1.800000 -0.081000
v -2.991600 1.800000 0.081000
v -2.989450 1.666162 0.000000
v -2.985000 1.921950 0.000000
v -2.985000 1.921950 0.000000
v -2.981175 1.667844 -0.081000
v -2.981175 1.667844 0.081000
v -2.976687 1.920243 -0.081000
v -2.976687 1.920243 0.081000
@maheshgawali
maheshgawali / ffmpeg_with_srt.sh
Last active June 30, 2025 00:16
build ffmpeg with libsrt libx264 libx265 libaom libvpx libopus libfdk-aac
# combination of steps from
# https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
# and
# https://seanthegeek.net/455/how-to-compile-and-install-ffmpeg-4-0-on-debian-ubuntu/
response=
echo -n "Do you want to compile the optional libpulse as well (yes/no) > "
read response
@zulhfreelancer
zulhfreelancer / change-openssl-version.md
Last active May 8, 2025 14:02
How to switch OpenSSL version on Mac using Homebrew?

How to switch OpenSSL version on Mac using Homebrew?

Scenario: you have both OpenSSL 1.0 and 1.1 installed (using Brew) in your OSX system and you want to switch the current active version without removing other versions that already installed. Here is how to do it.

Step 1 - List all OpenSSL versions

$ ls -al /usr/local/Cellar/openssl*

/usr/local/Cellar/openssl:
@dreamer2908
dreamer2908 / register_baidu.md
Last active July 21, 2026 18:56
Register a Baidu account to download stuff???

Idea from ShinyMarusu @ Reddit:

  • https://www.reddit.com/r/Piracy/comments/auhyxk/how_do_i_download_from_panbaidu/eovyg8g/
  • I just unintentionally discovered how to do it after searching how to create an account for day and a half. LOL hope it works for you too.
  • First go to this link (baidu cloud app) to register. Use your phone number to get the verification code and enter. For the rest, use google to translate the page and put your email adress, name, etc. and you're good to go. This method logs you to the cloud directly so you just step over the problematic pan,baidu registration which rejects non-chinese phone numbers for some reason. After registering I refreshed the page of the file I was trying to download and it showed me as already logged in, then I FINALLY could download the mod. It's sad this method isn't listed anywhere, I really searched a lot... Anyways, good luck!

More notes:

  • It's a pain in the rear. It took me an hour, but at least it worked.
  • Get an Chinese email. You will use it as yo
@th0rex
th0rex / Usage.md
Last active July 23, 2025 14:43
Build qemu as a library

Place file into qemu root directory Do cd path/to/qemu && ./name_of_file name_of_target (i.e. x86_64-softmmu) Library is at /path/to/qemu/x86_64-softmmu/libqemu.so You might need to compile vl.c and link with it in your final binary, just do something like this:

#define main __definetly_not_main
#include "/path/to/qemu/vl.c"
#undef main
import struct
# returns encoded dict
# this function assumes data in a particular format: it contains an array of field and values.
# each field is represented as a tuple of size 4 (value, wire type, field number, if field is an array)
# eg. message Msg { int64 id = 1; string text = 2; } => [[1234, 'varint', 1, False], ['hello world', 'string', 1, False]]
# also we can assume that every protobuf message is a dict at start, so this function is an entry point for encoding.
def encode_dict(data):
encoded_value = b''
for d in data:
@Hakky54
Hakky54 / openssl_commands.md
Last active July 1, 2026 19:36 — forked from p3t3r67x0/openssl_commands.md
OpenSSL Cheat Sheet

OpenSSL Cheat Sheet 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl