Skip to content

Instantly share code, notes, and snippets.

@JulienBlancher
JulienBlancher / filter.d_nginx-auth.conf
Last active March 26, 2024 12:52
Fail2ban Config with Nginx and SSH
#
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf:
#
# Blocks IPs that makes too much accesses to the server
#
[Definition]
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"
ignoreregex =
@jazzsasori
jazzsasori / gist:9051537
Created February 17, 2014 14:27
BlocksKit 2.0
// 今までの書き方
#import <BlocksKit/BlocksKit.h>
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button addEventHandler:^(id sender) {
// do something
} forControlEvents:UIControlEventTouchUpInside];
// 2.0の書き方
@schlamar
schlamar / !Python serialization
Created July 18, 2012 05:32
Python serializer benchmark: json, simplejson, cPickle, messagepack, simpleubjson, marshal, literal_eval
System
======
Windows 7
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
Small data
==========