This file contains hidden or 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
%% v6hex.erl: | |
%% IPv6-address tuple to hex string conversion | |
%% by Kenji Rikitake | |
%% MIT license (see the end of this module) | |
-module(v6hex). | |
-export([v6hex/1, | |
v6hex_revarpa/1, | |
v6hex_addr/1, |
This file contains hidden or 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 perl | |
use strict; | |
use warnings; | |
use Carp qw(cluck); | |
use autodie ':all'; | |
use Getopt::Long 2.33 qw(:config auto_help); | |
use File::Find::Rule; | |
use File::Basename 'basename'; |
This file contains hidden or 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 | |
###PUT HERE COMA SEPARATED LIST OF COUNTRY CODE### | |
COUNTRIES="AK,AR" | |
WORKDIR="/root" | |
####################################### | |
cd $WORKDIR | |
wget -c --output-document=iptables-blocklist.txt http://blogama.org/country_query.php?country=$COUNTRIES | |
if [ -f iptables-blocklist.txt ]; then | |
iptables -F | |
BLOCKDB="iptables-blocklist.txt" |
This file contains hidden or 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 | |
### Block all traffic from AFGHANISTAN (af) and CHINA (CN). Use ISO code ### | |
ISO="af cn" | |
### Set PATH ### | |
IPT=/sbin/iptables | |
WGET=/usr/bin/wget | |
EGREP=/bin/egrep | |
### No editing below ### |
This file contains hidden or 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
# makefile for newLISP v.10.x.x on LINUX with readline and UTF-8 support (statically linked) | |
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \ | |
nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o | |
CFLAGS = -Wl,static -static-libgcc -m32 -Wall -pedantic -Wno-strict-aliasing -Wno-long-long -c -O2 -g -DREADLINE -DSUPPORT_UTF8 -DLINUX | |
CC = gcc | |
default: $(OBJS) |
This file contains hidden or 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
root@napoleon:/etc# find . -name "*nginx*" | |
./rc6.d/K20nginx | |
./ufw/applications.d/nginx | |
./rc0.d/K20nginx | |
./init.d/nginx | |
./rc4.d/S20nginx | |
./rc5.d/S20nginx | |
./rc2.d/S20nginx | |
./rc3.d/S20nginx | |
./rc1.d/K20nginx |
This file contains hidden or 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
# from: http://www.tornadoweb.org/documentation | |
# running-tornado-in-production | |
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { |
This file contains hidden or 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
% same as date +%s | |
Time = fun() -> {Megasecs, Secs, _Microsecs} = erlang:now(), ((Megasecs * 1000000) + Secs) end. |
This file contains hidden or 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
sudo mv /usr/share/dbus-1/services/org.freedesktop.Notifications.service /usr/share/dbus-1/services/org.freedesktop.Notifications.service.disabled |
NewerOlder