Skip to content

Instantly share code, notes, and snippets.

@mattcollier
mattcollier / path.md
Last active September 29, 2021 13:27 — forked from nex3/path.md

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
curl -k -H "Accept: application/json" https://genesis.veres.one.localhost:42443/ledger-agents | json_pp
curl -k -H "Accept: application/json" https://genesis.veres.one.localhost:42443/ledger-agents/19ade110-2ef1-4194-ba53-df305a88c738/plugins/danube-agent -d {} | json_pp
@mattcollier
mattcollier / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Created September 25, 2018 17:25 — forked from Brainiarc7/VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

@mattcollier
mattcollier / enable_mongo.sh
Last active October 5, 2017 00:45 — forked from sgnn7/enable_mongo.sh
Mongodb 3.2 on Ubuntu 15.10
echo '[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target
[Service]
LimitNOFILE=infinity
LimitNPROC=infinity
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
var toxcore = require('toxcore');
// Create a default Tox instance
var tox = new toxcore.Tox();
// Try to load our tox file
tox.loadFromFile('my.tox', function(err) {
if(!err) {
console.log('Loaded from file successfully');
} else {