Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jonathan Prass Martins jonathanpmartins

🏠
Working from home
View GitHub Profile
@jonathanpmartins
jonathanpmartins / h264_nvenc.txt
Created Jul 9, 2022 — forked from nico-lab/h264_nvenc.txt
ffmpeg -h encoder=h264_nvenc
View h264_nvenc.txt
Encoder h264_nvenc [NVIDIA NVENC H.264 encoder]:
General capabilities: dr1 delay hardware
Threading capabilities: none
Supported hardware devices: cuda cuda d3d11va d3d11va
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 rgb0 gbrp gbrp16le cuda d3d11
h264_nvenc AVOptions:
-preset <int> E..V....... Set the encoding preset (from 0 to 18) (default p4)
default 0 E..V.......
slow 1 E..V....... hq 2 passes
medium 2 E..V....... hq 1 pass
@jonathanpmartins
jonathanpmartins / test-doc-see-as-virus-by-clamav.txt
Created May 7, 2022 — forked from mikecastrodemaria/test-doc-see-as-virus-by-clamav.txt
A simple text file to be used as positive test for ClamAv virus scanner
View test-doc-see-as-virus-by-clamav.txt
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
@jonathanpmartins
jonathanpmartins / subsetSum.js
Created Aug 13, 2021 — forked from rbarilani/subsetSum.js
Finding all possible combinations of numbers to reach a given sum ()
View subsetSum.js
function subsetSum(numbers, target, partial) {
var s, n, remaining;
partial = partial || [];
// sum partial
s = partial.reduce(function (a, b) {
return a + b;
}, 0);
@jonathanpmartins
jonathanpmartins / encrypt-chrome-notification-payload.js
Created Apr 26, 2016
Simple Node server to encrypt Chrome 50 Payloads
View encrypt-chrome-notification-payload.js
var http = require('http');
var encrypt = require('./encrypt');
function processPost(request, response, callback) {
var queryData = "";
if(typeof callback !== 'function') return null;
if(request.method == 'POST') {
request.on('data', function(data) {
queryData += data;
@jonathanpmartins
jonathanpmartins / install-libsodium.sh
Last active Jul 28, 2019
Install Libsodium on Ubuntu 14.04.3 LTS Trusty
View install-libsodium.sh
#!/bin/bash
sudo add-apt-repository ppa:chris-lea/libsodium;
sudo echo "deb http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo echo "deb-src http://ppa.launchpad.net/chris-lea/libsodium/ubuntu trusty main" >> /etc/apt/sources.list;
sudo apt-get update && sudo apt-get install libsodium-dev;
@jonathanpmartins
jonathanpmartins / install-libsodium.sh
Last active Sep 14, 2017 — forked from sarciszewski/install-libsodium.sh
Install libsodium-1.0.2 and PECL libsodium on Ubuntu 14.04
View install-libsodium.sh
#!/usr/bin/env bash
PECLVER="0.1.1"
LIBSODIUMVER="1.0.2"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
View supervidor-sample-config.conf
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Notes:
; - Shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
View ClearBeanstalkdQueueCommand.php
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class ClearBeanstalkdQueueCommand extends Command {
/**