Skip to content

Instantly share code, notes, and snippets.

View feedsbrain's full-sized avatar
:octocat:
Catching 8 dimensions of wellness

Indra Gunawan feedsbrain

:octocat:
Catching 8 dimensions of wellness
View GitHub Profile
@feedsbrain
feedsbrain / mixing_recordings.md
Created August 26, 2021 10:25 — forked from igracia/mixing_recordings.md
Mixing Recordings

Working with Twilio Room Recordings

The following guide will show you how to mix several audio and video tracks together, forming a grid. For this example, we will use two video and two audio tracks. The video tracks will be placed side by side in a 1024x768 output file.


UPDATE - Video Recording Compositions API is out!

Yes! No ned to go through this process alone anymore. We've recently released the Twilio Recording Composition API. This API will allow you to compose and transcode you Room Recordings. You can find the reference docs here

@feedsbrain
feedsbrain / resize.js
Created November 9, 2020 16:42
Better Way to Resize Image
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var img = new Image();
img.onload = function () {
// set size proportional to image
canvas.height = canvas.width * (img.height / img.width);
// step 1 - resize to 50%
@feedsbrain
feedsbrain / gitlab_access_token.md
Created November 2, 2020 04:21 — forked from michaellihs/gitlab_access_token.md
Create Gitlab Personal Access Token using curl

Create Gitlab Personal Access Token using curl

Prerequisites

  • You need a Gitlab server up and running
  • You need user credentials for a (admin) user on the Gitlab server
  • You need curl and Perl on your server
@feedsbrain
feedsbrain / next-less.config.js
Created October 24, 2020 01:25
Next.js Ant Design LESS + CSS Loader (Custom Plugin)
const cssLoaderConfig = require('@zeit/next-css/css-loader-config')
module.exports = (nextConfig = {}) => {
return Object.assign({}, nextConfig, {
webpack(config, options) {
if (!options.defaultLoaders) {
throw new Error(
'This plugin is not compatible with Next.js versions below 5.0.0 https://err.sh/next-plugins/upgrade'
)
}
@feedsbrain
feedsbrain / ffmpeg-qsv.sh
Last active May 20, 2024 08:39
Compiling FFMpeg with Intel Quick Sync in Ubuntu 20.04
#!/bin/bash
# Taken from: https://red-full-moon.com/make-hevc-qsv-env-first-half/
# 環境の最新化
sudo apt update
sudo apt dist-upgrade
# 必要パッケージのインストール
sudo apt install cmake make autoconf automake libtool g++ bison libpcre3-dev pkg-config libtool libdrm-dev xorg xorg-dev openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev libpciaccess-dev libfdk-aac-dev libvorbis-dev libvpx-dev libx264-dev libx265-dev ocl-icd-opencl-dev pkg-config yasm libx11-xcb-dev libxcb-dri3-dev libxcb-present-dev libva-dev libmfx-dev intel-media-va-driver-non-free opencl-clhpp-headers
# libvaのインストール
@feedsbrain
feedsbrain / install.sh
Created May 19, 2020 15:27
Jetson Nano TP Link AC600 Drivers
#!/bin.bash
sudo apt install git dkms
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux
cd rtl8812AU_8821AU_linux
git checkout 4235b0e
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile
sed -i 's/CONFIG_PLATFORM_ARM_JET_NANO = n/CONFIG_PLATFORM_ARM_JET_NANO = y/g' Makefile
sed -i 's/install -m/install --force -m/g' Makefile.dkms
sudo make -f Makefile.dkms install
@feedsbrain
feedsbrain / server.js
Last active September 5, 2019 10:08
Angular 2
const express = require('express')
const path = require('path')
const fs = require('fs')
const app = express()
const staticRoot = path.resolve() // this is you app root
app.set('port', process.env.PORT || 3000)
app.use(express.static(staticRoot))
app.use(function (req, res, next) {
// if the request is not html then move along
@feedsbrain
feedsbrain / web.config
Last active September 5, 2019 10:12
Angular IIS
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<webSocket enabled="false" />
<handlers>
<!-- Indicates that the server.js file is a node.js site to be handled by the iisnode module -->
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
<rewrite>
<rules>

Keybase proof

I hereby claim:

  • I am feedsbrain on github.
  • I am feedsbrain (https://keybase.io/feedsbrain) on keybase.
  • I have a public key ASDS_h_DKOpIAhkLmWyZgs2ZpV60mtMPOCrHgKodxFRGnwo

To claim this, I am signing this object:

@feedsbrain
feedsbrain / command.txt
Created June 29, 2018 17:13 — forked from nrk/command.txt
Using ffprobe to get info from a file in a nice JSON format
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json"