- Disable SELinux in `/etc/selinux/config` (need reboot)
- Install RPMFusion free&nofree repos rpm
- Install Wifi BCM4313 driver `yum install kmod-wl` after Step 2
- Install Adobe and Google repos rpm
- Install 163 mirror repos (http://mirrors.163.com/.help/fedora.html)
- Install build-essential alternative, `yum install make automake gcc gcc-c++ kernel-devel` or `yum-builddep sqlite` or `yum groupinstall “Development Tools”`
- Configure yum use proxy in /etc/yum.conf
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
gang@debian:~$ sudo apt-get install netcat-openbsd | |
gang@debian:~$ cat /usr/local/bin/git-proxy-wrapper | |
#!/bin/bash | |
nc -xlocalhost:1080 -X5 $* | |
gang@debian:~$ export GIT_PROXY_COMMAND=/usr/local/bin/git-proxy-wrapper |
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 net.ipv4.ip_forward = 1 in /etc/sysctl.conf | |
## NAT: | |
iptables -t nat -A POSTROUTING -s 1.1.9.251/32 -o ${INET_DEV} -j SNAT --to-source ${INET_IP} | |
## PORT FORWARDING: | |
iptables -t nat -A PREROUTING -i ${INET_DEV} -p tcp -m tcp --dport ${INET_PORT} -j DNAT --to-destination ${LOCAL_IP}:${LOCAL_PORT} |
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
<?xml version="1.0"?> | |
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> | |
<Configure id="Server" class="org.mortbay.jetty.Server"> | |
<Set name="ThreadPool"> | |
<New class="org.mortbay.thread.QueuedThreadPool"> | |
<Set name="minThreads">10</Set> | |
<Set name="maxThreads">200</Set> | |
<Set name="lowThreads">20</Set> |
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 | |
cd $HOME/public_html/voanews | |
SENEWS=$(date '+%y%m%d')_SE_NEWS.mp3 | |
HLNEWS=$(date '+%y%m%d')_HL_NEWS.mp3 | |
wget -O "${SENEWS}" \ | |
"http://www.voanews.com/mp3/voa/english/spec/SPECIAL_ENGLISH_NEWS.mp3" |
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
;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
;; If you want to create a file, visit that file with C-x C-f, | |
;; then enter the text in that file's own buffer. | |
(setq temp-articles '( | |
"progbot.html" | |
"lwba.html" | |
"avg.html" | |
"javacover.html" | |
"popular.html" |
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
backend host1 | |
mode http | |
server inst1 host1:port1 | |
backend host2 | |
mode http | |
server inst1 host2:port2 | |
frontend http-in | |
bind :80 |
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 perl | |
print "<pre>\n"; | |
while (<STDIN>) { print; } | |
print "</pre>\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
package tomcat.zookeeper; | |
import java.io.IOException; | |
import java.net.InetAddress; | |
import java.net.NetworkInterface; | |
import java.net.SocketException; | |
import java.util.Enumeration; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; |
NewerOlder