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
#!/usr/bin/env bash | |
# chkconfig: 345 85 1 | |
# description: Startup script for dropbox daemon | |
# | |
# processname: dropboxd | |
# pidfile: /var/run/dropbox.pid | |
# config: /etc/sysconfig/dropbox | |
# | |
### BEGIN INIT INFO |
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
#!/usr/bin/env python | |
import urllib2 | |
import re | |
import os | |
import socket | |
#hostname = socket.gethostname() | |
hostname = "" | |
urlprovider = 'http://www.ugtop.com/' |
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
#!/usr/bin/env bash | |
DIR=$HOME/etc/get_password | |
. $DIR/get_password_string.txt | |
. $DIR/get_password_cycle.txt | |
ALGORITHM="sha1" # md4, md5, sha, sha1, ripemd160 and so on. | |
count=1 |
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
#!/usr/bin/env python | |
import re | |
import os | |
file = "/root/etc/iptables/accept/cidr" | |
regex = re.compile('^([0-9]{1,3})(\.([0-9]{1,3})){3}/[0-9]{1,2}') | |
os.system("iptables -F") | |
os.system("iptables -A INPUT -i lo -p all -j ACCEPT") |
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
#!/usr/bin/env bash | |
NFS_SERVER=192.168.1.100 | |
MOUNT_POINT=/mnt/nfs | |
yum install -y cachefilesd | |
if test `grep 'SELINUX=disabled' /etc/selinux/config > /dev/null; echo $?` -ne 0; then | |
sed -i 's/^secctx/#secctx/g' /etc/cachefilesd.conf | |
fi | |
chkconfig cachefilesd on |
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
#include <stdio.h> | |
#include <string.h> | |
#define BUGGY | |
#define PRICE_BENZ 6000000 | |
#define PRICE_CIGARETTE 42 | |
#define SEQ_1 "「一日何本くらい煙草をお吸いに?」: " | |
#define SEQ_2 "「%d本ですね」\n" |
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 | |
if test x`uname -s` != x'Darwin'; then | |
exit 0 | |
fi | |
if test `which reattach-to-user-namespace > /dev/null; echo $?` -ne 0; then | |
echo 'Error: reattach-to-user-namespace does not found.' | |
if test `which brew > /dev/null; echo $?` -eq 0; then | |
echo 'Info: Install reattach-to-user-namespace with homebrew.' |
NewerOlder