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 | |
HOST=localhost | |
BASE_BAK_FLDR=/backup/mongodb | |
RM_FLDR_DAYS="+7" | |
DB_BKP_FLDR=$BASE_BAK_FLDR/$(date +%d-%m-%Y) | |
[ ! -d $DB_BKP_FLDR ] && mkdir -p $DB_BKP_FLDR | |
mongodump --host $HOST --out $DB_BKP_FLDR |
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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' | |
Plugin 'mattn/webapi-vim' | |
Plugin 'mattn/gist-vim' | |
Plugin 'kien/ctrlp.vim' | |
Plugin 'bling/vim-airline' |
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
tail -f access_log | awk '{ $1="";print}' | grep -o '\([0-9]\{2,3\}.\)\{3\}\.[0-9]\{2,3\}' | |
cat access_log | awk '{ $1="";print}' | grep -o '\([0-9]\{2,3\}.\)\{3\}\.[0-9]\{2,3\}' | sort -n | uniq -c | sort -nr | head -20 |
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/sh | |
################################################################## | |
################################################################## | |
# | |
# The FreeBSD System Hardening Script | |
# David Childers - 15 February, 2010 | |
# | |
# This software is released under the Attribution-ShareAlike version 3.0 Licence. | |
# www.creativecommons.org/licenses/by-sa/3.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
Non-executable stack | |
sysctl kern.elf64.nxstack = 1 | |
sysctl kern.elf32.nxstack = 1 | |
Stack smashing protection | |
sysctl security.bsd.stack_guard_page = 1 | |
NULL page mapping | |
sysctl security.bsd.map_at_zero = 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
# FreeBSD 10.2 -- /etc/sysctl.conf version 0.47 | |
# https://calomel.org/freebsd_network_tuning.html | |
# | |
# low latency is important so we highly recommend that you disable hyper | |
# threading on Intel CPUs as it has an unpredictable affect on latency, cpu | |
# cache misses and load. | |
# | |
# These settings are specifically tuned for a "low" latency FIOS (300/300) and | |
# gigabit LAN connections. If you have 10gig or 40gig you will need to increase | |
# the network buffers as proposed. "man tuning" for more information. |
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
# $FreeBSD: releng/10.1/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $ | |
# | |
# Ensure ZFS uses 4k block size | |
vfs.zfs.min_auto_ashift=12 | |
kern.ipc.somaxconn=2048 | |
# set to at least 16MB for 10GE hosts | |
kern.ipc.maxsockbuf=16777216 | |
# socket buffers | |
net.inet.tcp.recvspace=4194304 | |
net.inet.tcp.sendspace=2097152 |
OlderNewer