Skip to content

Instantly share code, notes, and snippets.

@azanium
azanium / ffmpeg-install.sh
Last active June 9, 2018 04:35 — forked from clayton/ffmpeg-install.sh
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
# Encode to aac with mp4 container
ffmpeg -i taha.mp3 -c:a libfdk_aac -b:a 128k taha.m4a
# Encode to vorbis
@azanium
azanium / jwtRS512.sh
Last active May 15, 2024 18:03 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS512 key
ssh-keygen -t rsa -b 4096 -e SHA512 -f jwtRS512.key
# Don't add passphrase
openssl rsa -in jwtRS512.key -pubout -outform PEM -out jwtRS512.key.pub
cat jwtRS512.key
cat jwtRS512.key.pub
@azanium
azanium / busboy-UploadS3
Last active July 8, 2018 13:22 — forked from andrepadez/gist:9132454
Streamed Upload to S3 using busboy
var Busboy = require('busboy'); //A streaming parser for HTML form data: https://github.com/mscdex/busboy
var generateId = require('time-uuid');
//** Handler to recive file uploads via stream
module.exports.boUpload = {
method: 'POST',
path: '/upload/',
config:{
payload: 'stream'
},
handler: function (request) {
@azanium
azanium / .zshrc
Last active March 15, 2022 03:55
# export ANDROID_HOME=/Users/suhendra/Library/Android/sdk
# export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
# export DRONE_SERVER=https://drone-dev.auto.pink.cat
# export DRONE_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoiYXphc3RybyIsInR5cGUiOiJ1c2VyIn0.k8ljaYTXSlfKCucFtmJ9i_5QJqwPamKfQ2_03-7yLGI
# export KUBECONFIG=~/.kube/sso_nonprod_config
export LDFLAGS="-L/usr/local/opt/openssl/lib -undefined dynamic_lookup $LDFLAGS"
export CXXFLAGS="-I/usr/local/opt/openssl/include $CXXFLAGS"
export CFLAGS="-I/usr/local/opt/openssl/include $CFLAGS"
SPACESHIP_CHAR_SYMBOL=" \uf0e7"
@azanium
azanium / .vimrc
Created November 2, 2018 01:53
Vim Config
" be iMproved, it's 21st Century ;-)
"
set nocompatible
" no need filetype to load plugins
filetype off
" specify a directory for plugins
"
" - Avoid using standard Vim directory names like 'plugin'
@azanium
azanium / gist:b6a1aecc87f4505f956db3e2db1dd3d0
Created December 19, 2018 11:54 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@azanium
azanium / ainasoft.com
Created January 13, 2019 13:27
Nginx Reverse Proxy
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.10000000149011612</real>
@azanium
azanium / master.cnf
Created September 5, 2019 01:13
MySQL Replication Config
[mysqld]
bind-address = 192.168.56.9
server_id = 1
log_bin = /var/log/mysql/mysql-bin.log
log_bin_index = /var/log/mysql/mysql-bin.log.index
binlog_ignore_db = "mysql"
@azanium
azanium / Activate Office 2019 for macOS VoL.md
Created October 23, 2019 02:56 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref