Skip to content

Instantly share code, notes, and snippets.

View selboo's full-sized avatar
😀
Selboo

Selboo selboo

😀
Selboo
View GitHub Profile
@lilydjwg
lilydjwg / gh-check
Last active March 18, 2024 04:43
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
@jrelo
jrelo / megaraid_status.py
Created August 22, 2018 14:32
megaraid_status.py
#!/usr/bin/python
# $Id: megaclisas-status,v 1.52 2015/04/18 02:49:07 root Exp root $
#
# Written by Adam Cecile <gandalf@NOSPAM.le-vert.net>
# Modified vy Vincent S. Cojot <vincent@NOSPAM.cojot.name>
#
import os
import re
import sys
@lonelymtn
lonelymtn / mirror-port.sh
Created February 4, 2016 23:28
Mirror traffic between two interfaces using Linux's traffic controll subsystem (tc)
#!/usr/bin/env bash
# Time-stamp: <2014-07-31 13:31:43 (ryanc)>
#
# Description: Mirror traffic between two interfaces using Linux's
# traffic control subsystem (tc)
trap cleanup EXIT
CLEANUP=1
SRC_IFACE=$1
@mariocesar
mariocesar / access.lua
Last active July 1, 2024 02:30
Nginx Lua script redis based for Basic user authentication
function password_encode(password)
local bcrypt = require 'bcrypt'
return bcrypt.digest(password, 12)
end
function check_password(password, encoded_password)
local bcrypt = require 'bcrypt'
return bcrypt.verify(password, encoded_password)
end
@yunano
yunano / consul
Last active October 7, 2022 18:58
/etc/init.d/consul for CentOS 6
#!/bin/sh
#
# consul - this script manages the consul agent
#
# chkconfig: 345 95 05
# processname: consul
### BEGIN INIT INFO
# Provides: consul
# Required-Start: $local_fs $network
@noqqe
noqqe / ab-bench.txt
Created May 21, 2012 19:46
apache2.4 vs apache2.2 benchmark
Benchmarking 10.10.0.17 (be patient) | Benchmarking 10.10.0.16 (be patient)
Server Software: Apache/2.2.16 | Server Software: Apache/2.4.2
Server Hostname: 10.10.0.17 | Server Hostname: 10.10.0.16
Server Port: 80 Server Port: 80
Document Path: / Document Path: /
Document Length: 177 bytes Document Length: 177 bytes