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
#Python 2 | |
python -m SimpleHTTPServer 8080 | |
#Python 3 | |
python3 -m http.server 8113 |
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 | |
# ------------------------------------------------------------------ | |
# Author: Ryan C Koch - ryanckoch@gmail.com | |
# Purpose: CHECK TCP AND UDP CONNECTIVITY BETWEEN | |
# SOURCE AND DESTINATION HOSTS | |
# ------------------------------------------------------------------ | |
SOURCE_FILE="source.hosts" | |
DESTINATION_FILE="destination.hosts" | |
LOG_VERBOSE="logs/verbose.log" |
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
''' | |
Easy Mac | |
Copyright (2015) Sean Beck | |
Licensed under Creative Commons Attribution-ShareAlike 4.0 International | |
See: https://creativecommons.org/licenses/by-sa/4.0/ | |
Easily change your MAC address on Linux using `ifconfig` | |
''' | |
#!/usr/bin/python2.7 |
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 python | |
""" | |
Test parallel scripts running with asyncio executors. | |
Requires at least Python 3.4 to run. | |
""" | |
import asyncio | |
import os |
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
resource "digitalocean_droplet" "haproxy-www" { | |
image = "ubuntu-14-04-x64" | |
name = "haproxy-www" | |
region = "nyc2" | |
size = "512mb" | |
private_networking = true | |
ssh_keys = [ | |
"${var.ssh_fingerprint}" | |
] | |
connection { |
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
HTTP request limiting =================================================================================================================== | |
frontend ft_web | |
# Use General Purpose Couter (gpc) 0 in SC1 as a global abuse counter | |
# Monitors the number of request sent by an IP over a period of 10 seconds | |
stick-table type ip size 1m expire 10s store gpc0,http_req_rate(10s) | |
tcp-request connection track-sc1 src | |
# refuses a new connection from an abuser | |
tcp-request content reject if { src_get_gpc0 gt 0 } |
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
-- copied from: http://mogmet.blog20.fc2.com/blog-entry-55.html | |
select @@GLOBAL.KEY_BUFFER_SIZE + @@GLOBAL.INNODB_BUFFER_POOL_SIZE + @@GLOBAL.INNODB_LOG_BUFFER_SIZE + @@GLOBAL.INNODB_ADDITIONAL_MEM_POOL_SIZE + @@GLOBAL.NET_BUFFER_LENGTH as GLOBAL_BUFFER_SIZE, @@GLOBAL.SORT_BUFFER_SIZE + @@GLOBAL.MYISAM_SORT_BUFFER_SIZE + @@GLOBAL.READ_BUFFER_SIZE + @@GLOBAL.JOIN_BUFFER_SIZE + @@GLOBAL.READ_RND_BUFFER_SIZE as THREAD_BUFFER_SIZE, @@GLOBAL.KEY_BUFFER_SIZE + @@GLOBAL.INNODB_BUFFER_POOL_SIZE + @@GLOBAL.INNODB_LOG_BUFFER_SIZE + @@GLOBAL.INNODB_ADDITIONAL_MEM_POOL_SIZE + @@GLOBAL.NET_BUFFER_LENGTH + (@@GLOBAL.SORT_BUFFER_SIZE + @@GLOBAL.MYISAM_SORT_BUFFER_SIZE + @@GLOBAL.READ_BUFFER_SIZE + @@GLOBAL.JOIN_BUFFER_SIZE + @@GLOBAL.READ_RND_BUFFER_SIZE) * @@GLOBAL.MAX_CONNECTIONS AS TOTAL_MEMORY_SIZE, (@@GLOBAL.KEY_BUFFER_SIZE + @@GLOBAL.INNODB_BUFFER_POOL_SIZE + @@GLOBAL.INNODB_LOG_BUFFER_SIZE + @@GLOBAL.INNODB_ADDITIONAL_MEM_POOL_SIZE + @@GLOBAL.NET_BUFFER_LENGTH + (@@GLOBAL.SORT_BUFFER_SIZE + @@GLOBAL.MYISAM_SORT_BUFF |
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
# At most 10 concurrent connections from a client | |
acl too_fast fe_sess_rate ge 10 | |
# Matches any path beginning with a given prefix | |
acl bursts_inclined path_beg -i /client1 | |
# Effectively working as a delay mechanism for clients that are too fast | |
tcp-request inspect-delay 1000ms | |
# Fast-path - accept connection if it's not this troublesome client |
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
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo | |
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode | |
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes | |
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980 | |
E...^.@.@............q#...}L............... | |
..#...#.GET /index/_search HTTP/1.1 | |
Host: 127.0.0.1:9200 | |
Accept: */* | |
Content-Length: 845 | |
Content-Type: application/x-www-form-urlencoded |
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
#To Get List of Hardware | |
sudo networksetup -listallhardwareports | |
#To Disable IPv6 on Wifi Adapter | |
sudo networksetup -setv6off wi-fi | |
#To Disable IPv6 on Built-in Ethernet Adapter | |
sudo networksetup -setv6off Ethernet |
OlderNewer