Skip to content

Instantly share code, notes, and snippets.

@yulis
yulis / iperf_tests.sh
Created October 8, 2018 21:37
Script to generate iperf data to be plotted by iperf_tests.py
#!/bin/bash
################################
# Jimmy Cullen #
# Version 1.0, 2011-05-04 #
# The University of Manchester #
################################
# Revision 1.1, 2011-06-02
# iperf-2.0.2 used with the -r flag causes incorrect output, therefore removed from script
@yulis
yulis / gist:1f765f90aa25c7453f3ea8af80d1d0ca
Created September 28, 2018 07:01
Stream video from remote webcam
ssh [HOST] -Y "mplayer tv://device=/dev/video0"
@yulis
yulis / make-kiosk.sh
Created January 24, 2018 11:59 — forked from voor/make-kiosk.sh
Configuring Kiosk Mode on CentOS
#!/bin/bash
# KIOSK generator for Scientific Linux and CentOS (versions 5; 6 and 7)
# Created using Scientific Linux
# Wasn't made and never tested on different distros than SL/CentOS/EL!
# Version 1.4 for i386 and x86_64
#
# Feel free to contact me: [email protected]
# www.marcinwilk.eu
# Marcin Wilk
@yulis
yulis / gist:40c58679d5ec3423600a9972a81ebf7f
Created July 18, 2017 16:00 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@yulis
yulis / heupdater.txt
Created February 27, 2017 23:05 — forked from horzadome/heupdater.txt
Hurricane Electric IPv6 tunnel updater script for Mikrotik RouterOS
# Update Hurricane Electric IPv6 Tunnel Client IPv4 address
# This is an upgrade to an existing script from
# http://wiki.mikrotik.com/wiki/Hurricane_Electric_IPv6_Tunnel_-_IPv4_Endpoint_updater
# API call format:
# https://#USERNAME:[email protected]/nic/update?username=$USERNAME&password=$API_KEY&hostname=$TUNNEL_ID
# ----------------------------------
# Modify the following to match your parameters
# ----------------------------------
# Router's WAN interface name
@yulis
yulis / vxlan.sh
Last active August 26, 2021 16:50
Set up vxlan tunnel
#!/bin/bash
# On Host 192.168.100.25
ovs-vsctl add-br testbr0
ovs-vsctl add-port testbr0 tun1 -- set interface tun1 type=internal
ifconfig tun1 172.17.17.1 netmask 255.255.255.0
ovs-vsctl add-port testbr0 testvxlan0 -- set interface testvxlan0 type=vxlan options:remote_ip=192.168.100.24
# On Host 192.168.100.24
ovs-vsctl add-br testbr0
@yulis
yulis / sysctl-tune.sh
Created November 16, 2016 19:20
Sysctl network tune-up
sysctl -w fs.file-max="9999999"
sysctl -w fs.nr_open="9999999"
sysctl -w net.core.netdev_max_backlog="4096"
sysctl -w net.core.rmem_max="16777216"
sysctl -w net.core.somaxconn="65535"
sysctl -w net.core.wmem_max="16777216"
sysctl -w net.ipv4.ip_local_port_range="1025 65535"
sysctl -w net.ipv4.tcp_fin_timeout="30"
sysctl -w net.ipv4.tcp_keepalive_time="30"
sysctl -w net.ipv4.tcp_max_syn_backlog="20480"
@yulis
yulis / aws_autoscaling_complete_action.sh
Last active September 29, 2016 22:02
Clear terminate:wait for autoscaling groups
aws autoscaling complete-lifecycle-action \
--lifecycle-hook-name traefik-asg-terminate \
--auto-scaling-group-name traefik-asg \
--lifecycle-action-result CONTINUE \
--region=us-east-1 \
--instance-id=i-091ed324c0d1893fc
@yulis
yulis / update_pia_ipsec_policy.rsc
Created January 28, 2016 16:38
Update IPSec for PIA L2TP/IPSec RW setup
:global wanAddr;
:global wanIp;
:local wanInterface "ether1-gateway";
:local ipsecProposal "pia-l2tp";
:local newWanAddr [/ip address get [find interface="$wanInterface"] address];
:local newWanIp [:pick $newWanAddr 0 [:find $newWanAddr "/"]];
:if ($newWanAddr != $wanAddr) do={
#!/usr/bin/env python
################################
# Jimmy Cullen #
# Version 1.0, 2011-05-10 #
# The University of Manchester #
################################
# Python script to graph iperf test results from the bash script found at:
# http://www.jb.man.ac.uk/~jcullen/code/bash/iperf_tests_1.1.sh