Skip to content

Instantly share code, notes, and snippets.

View exceptionplayer's full-sized avatar
🦊
come on!

Danny W. exceptionplayer

🦊
come on!
  • HongKong
  • 18:51 (UTC +08:00)
View GitHub Profile
@exceptionplayer
exceptionplayer / rate_limit2.py
Created October 30, 2018 06:57 — forked from josiahcarlson/rate_limit2.py
Regular and sliding window rate limiting to accompany two blog posts.
'''
rate_limit2.py
Copyright 2014, Josiah Carlson - [email protected]
Released under the MIT license
This module intends to show how to perform standard and sliding-window rate
limits as a companion to the two articles posted on Binpress entitled
"Introduction to rate limiting with Redis", parts 1 and 2:
@exceptionplayer
exceptionplayer / nginx.conf
Created April 12, 2019 10:53 — forked from yllan/nginx.conf
設定 nginx 使用 server sent event
location xxxx {
proxy_pass http://localhost:9000;
proxy_buffering off;
proxy_cache off;
proxy_redirect off;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@exceptionplayer
exceptionplayer / FuturesB.java
Created September 20, 2019 18:32 — forked from benjchristensen/FuturesB.java
FuturesB.java Example of using Futures for nested calls showing how it blocks inefficiently.
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@exceptionplayer
exceptionplayer / udp_to_local.c
Created June 10, 2020 10:36 — forked from leonid-ed/udp_to_local.c
Examples of using raw sockets (c, linux, raw socket)
/*
An example of using raw sockets.
You can capture packets by tcpdump:
tcpdump -X -s0 -i lo -p udp
*/
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
@exceptionplayer
exceptionplayer / tcp_flags.txt
Created December 17, 2020 11:52 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)