Skip to content

Instantly share code, notes, and snippets.


Selivanov Pavel selivan

Block or report user

Report or block selivan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View safari-reaper.html
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
body {
belgattitude /
Last active Feb 17, 2019
Install libxl, php_excel extension on PHP7.1 (ondrej/ppa)
# ilia/php_excel extension example install script for PHP7+
# usage:
# > sudo ./
# > (optionally) sudo service php7.1-fpm restart)
# requirements:
# - Ubuntu 64bits (trusty/xenial)
sakalajuraj / auditd.conf
Last active Apr 21, 2019
Logstash configuration for auditd messages received via syslog
View auditd.conf
# Content of the file /etc/logstash/conf.d/auditd.conf
# Tested on the CentOS 7 auditspd logs forwarded to logstash via rsyslog
input {
syslog {
type => AUDITD
port => xxxx
host => ""
Schnouki /
Last active Jul 4, 2019
OpenVPN for a single application using network namespaces -- helper scripts
#!/usr/bin/env zsh
# Initialize VPN
sudo vpnns up
sudo vpnns start_vpn
# Popcorn time!
sudo ip netns exec frootvpn sudo -u $USER popcorntime
# Cleanup
yusufhm / logstash-ossec-alerts.conf
Last active May 22, 2017
Logstash configuration for reading OSSEC alerts files and send to Elasticsearch (credits to
View logstash-ossec-alerts.conf
input {
file {
type => "ossec"
path => "/var/ossec/logs/alerts/alerts.log"
sincedb_path => "/opt/logstash/"
codec => multiline {
pattern => "^\*\*"
negate => true
what => "previous"
denji /
Last active Feb 23, 2018
Priming the OCSP cache in Nginx
URL=$(openssl x509 -noout -ocsp_uri -in "$SERVER_CER")
openssl ocsp -noverify -no_nonce -respout ocsp.resp -issuer "$ISSUER_CER" -cert "$SERVER_CER" -url "$URL"
# Where "ocsp.resp" is whatever file you have configured in Nginx for the "ssl_stapling_file".
chrisboulton / ip_blacklist.lua
Last active Aug 13, 2019
Redis based IP blacklist for Nginx (LUA)
View ip_blacklist.lua
-- a quick LUA access script for nginx to check IP addresses against an
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403.
-- allows for a common blacklist to be shared between a bunch of nginx
-- web servers using a remote redis instance. lookups are cached for a
-- configurable period of time.
-- block an ip:
-- redis-cli SADD ip_blacklist
-- remove an ip:
jayjanssen / gist:5697813
Created Jun 3, 2013
Testing multicast with iperf
View gist:5697813
this is a sample of output:
root@percona-db-2:~# iperf -s -u -B -i 1
Server listening on UDP port 5001
Binding to local address
Joining multicast group
Receiving 1470 byte datagrams
UDP buffer size: 122 KByte (default)
davisford / gist:5039064
Last active Jun 21, 2019
git clone into non-empty directory
View gist:5039064

Let's say you start a project locally, and do some editing.

$ mkdir -p ~/git/foo && cd ~/git/foo
$ touch NEWFILE

Now you decide you want to create a new github repo and track it, but the directory is non-empty so git won't let you clone into it. You can fix this, thusly:

HowardMei / gist:4350896
Last active Apr 29, 2019
python bash integration
View gist:4350896
A collection of python & shell integration attempts:
pysh:Write shell scripts in Python
lshell:function limited shell
sh:similar to plumbum but has builtin features
You can’t perform that action at this time.