This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import base64 | |
import sys | |
import os | |
try: | |
import simplejson as json | |
except ImportError: | |
import json | |
# Takes decompressed https://opendata.rapid7.com/sonar.http/ scan file on stdin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
############################################################################### | |
# | |
# Intro: | |
# Automatically find the ideal JPEG quality setting for a JPEG image by | |
# calculating the output images dissimilarity from the input JPEG. This | |
# frees us from having to rely on the unstandardized quality integer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- nginx-1.10.2/src/http/modules/ngx_http_autoindex_module.c.orig 2016-10-18 17:03:14.000000000 +0200 | |
+++ nginx-1.10.2/src/http/modules/ngx_http_autoindex_module.c 2016-10-31 15:31:31.873696354 +0100 | |
@@ -54,6 +54,10 @@ | |
#define NGX_HTTP_AUTOINDEX_NAME_LEN 50 | |
+#define NGX_HTTP_AUTOINDEX_HDRIMG_COUNT 4 // indexing starts at zero | |
+#define NGX_HTTP_AUTOINDEX_HDRIMG_SIZE "96px" | |
+#define NGX_HTTP_AUTOINDEX_HDRIMG_UPRE "/_/h" | |
+#define NGX_HTTP_AUTOINDEX_HDRIMG_UPOST ".png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
OUTDIR=/tmp/waifu2x-cpp_install | |
OPENCV_VER=4.7.0 | |
[ -d waifu2x-converter-cpp ] && (cd waifu2x-converter-cpp && git pull) || git clone https://github.com/DeadSix27/waifu2x-converter-cpp | |
[ -f opencv-$OPENCV_VER.tar.gz ] || wget https://github.com/opencv/opencv/archive/$OPENCV_VER.tar.gz -O opencv-$OPENCV_VER.tar.gz | |
[ -d opencv-$OPENCV_VER ] || tar -xaf opencv-$OPENCV_VER.tar.gz | |
cd opencv-$OPENCV_VER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
CORES=4 | |
OUTDIR=/tmp/cubicsdr_install | |
CUBICSDR_STABLE=1 # 1 for latest tagged version or 0 for git HEAD | |
[ -d CubicSDR ] && (cd CubicSDR && git pull) || git clone https://github.com/cjcliffe/CubicSDR | |
[ -d liquid-dsp ] && (cd liquid-dsp && git pull) || git clone https://github.com/jgaeddert/liquid-dsp | |
cd liquid-dsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
What you need: | |
* nginx | |
* dependencies to build CutyCapt (http://cutycapt.sourceforge.net/) | |
Steps: | |
* build CutyCapt with CutyCapt.patch applied and copy the executable somewhere | |
* install nginx and edit the config as outlined in nginx.conf | |
* change the paths to nginx, the nginx config and the patched cutycapt in renewcf.sh | |
* start nginx | |
* ensure that renewcf.sh runs every 55 minutes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- desmume-0.9.10/src/sndsdl.cpp.orig 2013-11-28 01:37:18.797021001 +0100 | |
+++ desmume-0.9.10/src/sndsdl.cpp 2015-03-14 22:24:04.184578448 +0100 | |
@@ -16,6 +16,7 @@ | |
along with the this software. If not, see <http://www.gnu.org/licenses/>. | |
*/ | |
+#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import getopt | |
from PIL import Image | |
xterm256colors = [ # http://pln.jonas.me/xterm-colors | |
(0, (0x00, 0x00, 0x00)), # SYSTEM | |
(1, (0x80, 0x00, 0x00)), # SYSTEM | |
(2, (0x00, 0x80, 0x00)), # SYSTEM | |
(3, (0x80, 0x80, 0x00)), # SYSTEM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
CRF=21 | |
ABITRATE=256k | |
FILENAME=recording`date +%d-%m-%Y_%H.%M`.mp4 | |
CMD=`xwininfo | awk '/Width/{printf"ffmpeg -f x11grab -s "$2"x"}/Height/{printf$2" -i '$DISPLAY'"}/Corners/{gsub(/\+/,",",$2);sub(/,/,"+",$2);print$2" -f alsa -i pulse -c:v libx264 -preset ultrafast -crf 0 -c:a copy"}'` | |
CMD="${CMD} -vf scale='iw+mod(iw,2):ih+mod(ih,2)' _tmp_record.nut" | |
# -vf scale='iw+mod(iw,2):ih+mod(ih,2)' makes sure the width and height are diviseable by 2 (needed for libx264) | |
echo "Press ^C to stop recording" |