Skip to content

Instantly share code, notes, and snippets.

View pat36's full-sized avatar
🐉
fighting dragons

pat36

🐉
fighting dragons
View GitHub Profile
@pat36
pat36 / ffmpeg.sh
Created February 21, 2016 13:39
Start of ffmpeg.sh
# Commands which I use in ffmpeg on Windows 7
# Converting gif file to webm file
ffmpeg -i input.gif -c:v libvpx -crf 13 -b:v 4M output.webm
# Converting to h.265 codec
ffmpeg -i input -c:v libx265 -preset medium -x265-params crf=18 -c:a aac -strict experimental -b:a 128k output
@pat36
pat36 / image.py
Last active September 3, 2016 18:34
działający generator obrazów
import numpy as np
from random import randint
from PIL import Image as img
height = int(input("Podaj wysokosc obrazu: "))
width = int(input("Podaj szerokosc obrazu: "))
image = np.zeros(shape=(width, height), dtype="S6")
for i in range(0, height):
#!/bin/sh
./configure \
--prefix=/usr \
--extra-cflags="-I/usr/include/nvidia-sdk" \
--extra-cxxflags="-std=gnu++98" \
--disable-debug \
--disable-static \
--disable-stripping \
--enable-avisynth \
--enable-avresample \
@pat36
pat36 / JS_PrzestawianiePudelek_03_konkurs.html
Created November 13, 2016 20:33
brzydkie rozwiązanie
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> Przemieszczanie w lewo </title>
<meta name="description" content="Wersja prosta.">
</head>
<style>
.pudelko {
@pat36
pat36 / cat.c
Created May 21, 2017 20:23
My simple implementation of cat program
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if(argc != 2) return -1;
FILE* fp;
char c;
fp = fopen(argv[1], "r");
while((c = getc(fp)) != EOF)
printf("%c", c);
fclose(fp);
@pat36
pat36 / JJTe-0.go
Created July 15, 2017 13:18
null created by anonymous - https://repl.it/JJTe/0
package main
import "fmt"
type Board struct {
ID string
OwnerID string
ShortName string
Anonymize bool // No namefagging
}

Keybase proof

I hereby claim:

  • I am pat36 on github.
  • I am pat36 (https://keybase.io/pat36) on keybase.
  • I have a public key whose fingerprint is 687F ABAE 6A4B 0790 70E1 880E CDAF 1DC2 EFBD 58A0

To claim this, I am signing this object:

@pat36
pat36 / ipfs.service
Created October 12, 2017 16:59
sudo cp ipfs.service /etc/systemd/system/ipfs.service
[Unit]
Description=IPFS daemon
After=network.target
[Service]
ExecStart=/usr/bin/ipfs daemon
[Install]
WantedBy=multiuser.target
import ipfsapi
import json
ipfs = ipfsapi.connect()
# JSON:
# { "data" : "something...", "previousBlock" : "ipfs hash to previous block"}
# genesisHash is "Qm00000000000000000000000000000000000000000000"
# when previousBlock == genesisHash then we reached the first block
genesisHash = "Qm00000000000000000000000000000000000000000000"
@pat36
pat36 / ffmpeg-vp8&9-encode-test-vaapi-intel.md
Created December 12, 2017 19:58 — forked from Brainiarc7/ffmpeg-vp8&9-encode-test-vaapi-intel.md
PSA: You can now use FFmpeg's VAAPI-based VP8 and VP9 encoder on Skylake+ systems on Linux: Tested on Ubuntu 16.04LTS

Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:

Build platform: Ubuntu 16.04LTS.

First things first:

Build the dependency chain first.

  1. cmrt: