Skip to content

Instantly share code, notes, and snippets.

View hex128's full-sized avatar
👾

Hex hex128

👾
View GitHub Profile
@hex128
hex128 / jenkins-2-no-valid-crumb-nginx.url
Last active July 30, 2016 17:24
Jenkins 2 No valid crumb was included in the request
https://issues.jenkins-ci.org/browse/JENKINS-12875?focusedCommentId=168028&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-168028
@hex128
hex128 / rtpdec_h264.patch
Last active July 30, 2016 17:25
Ignore invalid sprop-parameter-sets
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -168,6 +168,10 @@ static int sdp_parse_fmtp_config_h264(AVFormatContext *s,
int ret;
+ if (value[strlen(value) - 1] == ',') {
+ av_log(s, AV_LOG_WARNING, "Missing PPS in sprop-parameter-sets, ignoring\n");
+ return 0;
+ }
codec->extradata_size = 0;
av_freep(&codec->extradata);
@hex128
hex128 / nodejs.service
Last active July 30, 2016 17:26
Node.JS server with SystemD socket activation
[Service]
ExecStart=/usr/bin/node /var/www/server.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=nodejs
User=www-data
Group=www-data
@hex128
hex128 / ukrpost.py
Last active July 30, 2016 17:27
ukrposhta.ua tracking script
#!/usr/bin/python2
# -*- coding: utf-8 -*-
from sys import stdout, stderr, exit, argv
from codecs import getwriter
from signal import signal, SIGINT
from urllib import urlencode
from urllib2 import build_opener, HTTPCookieProcessor, Request
from cookielib import CookieJar
from bs4 import BeautifulSoup
@hex128
hex128 / rtmp-stream.conf
Last active July 30, 2016 17:27
RTMP streaming daemon based on FFmpeg
# Set settings and rename to rtsp-stream.conf
# Main video stream
camera="rtsp://127.0.0.1/stream"
# ALSA sound input
alsa_i="hw:0"
# RTMP server URL
server="rtmp://a.rtmp.youtube.com/live2"
# RTMP stream name
stream="username.1234-5678-90ad-cdef"
# Video size
0000000: 405a 5000 0060 0000 0100 3500 8002 8680 @ZP..`....5.....
0000010: 2b42 8680 0111 010d 8b03 0005 f000 4000 /B............@.
0000020: c9de 5014 0e24 3101 4b88 0024 d7a6 4d0c ..P..$1.K..$..M.
0000030: 1669 1679 1689 1699 ffff 1000 feff 0000 .i.y............
0000040: 7419 0c03 0000 0460 fdec 1003 0418 44e2 t......`......D.
0000050: cc77 2201 1469 9224 1a00 9831 6bcc 8f1f .w"..i.$...1k...
0000060: e0cf 8007 e0c1 b83f 3fff 0000 0000 2000 .......??..... .
0000070: 280a 810e 0000 0000 0000 0000 0000 0000 (...............
0000080: 0000 0000 0000 ebdb 3604 f001 4611 0000 ........6...F...
0000090: 1c77 0024 d7a6 4d0d 0400 0000 0000 5000 .w.$..M.......P.
#!/usr/bin/env bash
VIDEO=${1}
IMAGE=${2}
TITLE=${3}
TEXT=${4}
NAME=${5}
TIME_FROM_END=${6}
OUTPUT=${7}
FRAME_FONT="frame-font.ttf"
FRAME_COLOR="#313781"
#!/usr/bin/python2
# -*- coding: utf-8 -*-
from urllib2 import urlopen, HTTPError
from bs4 import BeautifulSoup
from json import dumps
from sys import stdout, exit, stdin
from codecs import getwriter, getreader
from signal import signal, SIGINT
from re import compile
#NoEnv
#SingleInstance Force
#NoTrayIcon
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode RegEx
#a:: Winset, Alwaysontop, , A
#NoEnv
#SingleInstance Force
#NoTrayIcon
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode RegEx
#IfWinActive ahk_class ExploreWClass|CabinetWClass|Progman
#h::