Skip to content

Instantly share code, notes, and snippets.

View betapcode's full-sized avatar

Phạm Ngọc Minh betapcode

  • tamtay.vn
  • Hà Nội - Việt Nam
View GitHub Profile
@betapcode
betapcode / diskspace.sh
Created February 5, 2015 15:44
file check disk space on server linux
#!/bin/bash
# Created by @betapcode - time 05/12/2014
# Check Out of disk space on server
# Copyright (c) 2005 nixCraft project <http://cyberciti.biz/fb/>
# admin email account - eg: minh.pham@tamtay.vn betapcode@gmail.com pnminh.it@gmail.com
ADMIN="minh.pham@tamtay.vn"
# set usage alert threshold - default is 90%
THRESHOLD=90
@betapcode
betapcode / ghost.c
Created January 28, 2015 04:01
ghost.c
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
char canary[sizeof(CANARY)];
}
@betapcode
betapcode / etc.init.d.nginx
Created January 23, 2015 13:09
File Config Nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# pidfile: /var/run/nginx.pid