Skip to content

Instantly share code, notes, and snippets.

#include "test/jemalloc_test.h"
#include <sys/wait.h>
#include <unistd.h>
#include <pthread.h>
void* alloc_thread(void) {
int i;
void *p;
p = malloc(4098);
@lazy404
lazy404 / badbots.lst
Created March 30, 2016 20:54
A list of bad and "good" User-Agents (robots) that are worth blocking with haproxy. This will help stop your bandwidth being used up by these crawlers. I continually add to this list at least once a week. This is the haproxy rule I use. acl badbots hdr_reg(User-Agent) -i -f /etc/haproxy/badbots.lst block if badbots
# -----------------------------------------------------------------
# User-Agent strings that are worth blocking with the following rule
# in haproxy to prevent your content being stolen, stop spammers and
# to limit your bandwidth usage.
#
# acl badbots hdr_reg(User-Agent) -i -f /etc/haproxy/badbots.lst
# block if badbots
#
# By Danny Sheehan
# http://www.setuptips.com
# Time: 150917 6:32:15
# Query_time: 9.722736 Lock_time: 0.000230 Rows_sent: 843 Rows_examined: 4236986529430166139 Rows_affected: 0
# Time: 150917 6:32:23
# Query_time: 7.730389 Lock_time: 0.000377 Rows_sent: 843 Rows_examined: 4236986529430166139 Rows_affected: 0
# Time: 150917 6:32:29
# Query_time: 8.331556 Lock_time: 0.000327 Rows_sent: 843 Rows_examined: 4236986529430166139 Rows_affected: 0
# Time: 150917 6:33:00
# Query_time: 11.715055 Lock_time: 0.000235 Rows_sent: 843 Rows_examined: 4236986529430166139 Rows_affected: 0
# Time: 150917 6:33:02
# Query_time: 11.610054 Lock_time: 0.000361 Rows_sent: 843 Rows_examined: 4236986529430166139 Rows_affected: 0
@lazy404
lazy404 / nginx.conf
Last active August 29, 2015 14:07 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048