Skip to content

Instantly share code, notes, and snippets.

@nxtreaming
nxtreaming / squid.conf
Created April 9, 2018 06:06 — forked from hardikdangar/squid.conf
squid.conf
# General
http_port 3130
http_port 3128 intercept
https_port 3129 intercept ssl-bump cert=/etc/squid/ssl_cert/srtpl.pem generate-host-certificates=on dynamic_cert_mem_cache_size=4MB
acl DiscoverSNIHost at_step SslBump1
acl NoSSLIntercept ssl::server_name_regex -i "/etc/squid/url.nobump"
ssl_bump splice NoSSLIntercept
ssl_bump peek DiscoverSNIHost
@nxtreaming
nxtreaming / Cmd_stats
Created March 31, 2018 05:37 — forked from Toboe/Cmd_stats
linux,tools,stats,commands
Curl
feh --thumbnails --index-info "%n\n%wx%h"
feh --list
feh --draw-tinted --info "exifgrep '(Model|DateTimeOriginal|FNumber|ISO|Flash|ExposureTime|FocalLength.\\*)' '%f' | cut -d . -f 4-"
feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120 -S width -n -d --cache-thumbnails
mplayer -ss 670 -frames 1 -vo jpeg -nosound movie.avi
mplayer -ao null -ss 0:51:48 -endpos 15 -vo gif89a:output=16.gif:fps=17 palette,format=bgr=24 Ololo.avi
ffmpeg -i movie.mp4 -vcodec copy -acodec copy -ss 00:37:40 -t 00:01:10 /mnt/destvideo.mp4
@nxtreaming
nxtreaming / install_bbr_on_ubuntu.sh
Created March 13, 2018 11:33 — forked from kxfeng/install_bbr_on_ubuntu.sh
install bbr on ubuntu
# download linux kenel
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>_all.deb
wgte http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-headers-<version>-generic_<version>_arm64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/<version>/linux-image-<version>-generic_<version>_amd64.deb
# intsall linux kenel
sudo dpkg -i *.deb
# unintsall old kenel
dpkg -l|grep linux-image
# Author: Aram Grigorian <[email protected]>
# https://github.com/aramg
# https://github.com/opendns
#
# By default, nginx will close upstream connections after every request.
# The upstream-keepalive module tries to remedy this by keeping a certain minimum number of
# persistent connections open at all times to upstreams. These connections are re-used for
# all requests, regardless of downstream connection source. There are options available
# for load balacing clients to the same upstreams more consistently.
# This is all designed around the reverse proxy case, which is nginxs main purpose.
@nxtreaming
nxtreaming / rtmp_loop.c
Last active October 11, 2016 13:39
A simple service to loop RTMP VOD streaming
/*
* loop_rtmp.c: A simple service to loop RTMP VOD streaming
*
* Usage:
* loop_rtmp <playlist> <channel>
*
*/
#include <unistd.h>
#include <stdint.h>