Xfce volume control shortcuts

https://wiki.archlinux.org/index.php/Xfce#Change_volume_with_keyboard_volume_buttons

bash color

$ cat color.sh
#!/bin/sh

txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m' # Black - Background
bakred='\e[41m' # Red
badgrn='\e[42m' # Green
bakylw='\e[43m' # Yellow
bakblu='\e[44m' # Blue
bakpur='\e[45m' # Purple
bakcyn='\e[46m' # Cyan
bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset

nocolor="\e[0m"

cecho()
{
echo -e "${2}${1}${nocolor}"
}

cecho
cecho "no color"
cecho "red" $txtred
cecho "cyan" $txtcyn

khugepaged eats up all the cpu in Fedora 15

see https://bugzilla.redhat.com/show_bug.cgi?id=735946, the following seems to help
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo madvise > /sys/kernel/mm/transparent_hugepage/defrag

Android copy apps from old sd to new sd card

First, do not do automount, otherwise all the ownership and permission will be wrong. Format new sd card from windows.
# mount /dev/sde1 /mnt/oldsd
# mount /dev/sdg1 /mnt/newsd
# cp -a /mnt/oldsd/* /mnt/newsd
# cp -a /mnt/oldsd/.* /mnt/newsd
# cd /mnt/newsd
# rsync -av /mnt/oldsd .
# umount /mnt/oldsd
# umount /mnt/newsd


Now the apps on the new sd will be recognized.

Editing Initrd

extracting initrd

mkdir initrd
cd initrd
zcat ../initrd.img | cpio -i --make-directories

repacking

(find . | cpio -H newc -o) > ../initrd.img
cd ..
gzip initrd.img
mv initrd.img.gz initrd.img

upbacking modules.cgz

gzip -dc modules.cgz > /tmp/modules.cpio
cd /tmp/
mkdir modules
cd modules
cpio -idumv < ../modules.cpio

repacking modules.cgz

find . -print -depth |cpio -H crc -ovF ../modules.cpio
cd ..
gzip -S .cgz modules.cpio 
cp modules.cpio.cgz  modules.cgz

custom kernel with rpmbuild

make targets:
make
make modules
make modules_install

Generate patch:
diff -Naurp old new > my.patch

Modify kernel steps
put the following in .rpmmacros:
cat ~/.rpmmacros
%_topdir %(echo /home/user/mypath)/rpm
%_tmppath %(echo /home/user/mypath)/rpm/tmp
%debug_package %{nil}
  • install the src package
    rpm -i kernel*.src.rpm
  • generate patches and put in SOURCES
  • modified kernel*.config in SOURCES
  • modified SPEC/kernel*.spec to pickup the patches
    Patch3000: my.patch
    %patch3000 -p1
apply the patch (cd to SPECS)
rpmbuild -bp --target=i686 kernel-2.6.spec


build:
rpmbuild -bb --with baseonly --without debug --without debuginfo --without kabichk --target=i686 kernel-2.6.spec
use buildid to change buildname
build without rpm
rpmbuild -bp kernelsrc.rpm
cd rpm/kernel/sourcedir
cp favor_config to .config
make menuconfig # set prefix
make -j8
make modules_install
make install

Java

http://triton.towson.edu/~mzimand/os/Lect2-java-tutorial.html
http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B
http://triton.towson.edu/~mzimand/os/Lect2-java-tutorial.html

VNC xstartup for XFCE

$ cat .vnc/xstartup

#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
export PATH=$PATH:/localdisk/programs/xfce/bin:/localdisk/programs/xfce/sbin
export LD_LIBRARY_PATH=/localdisk/programs/xfce/lib
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
vncconfig -iconic&
startxfce4 &

httpd itk

http://www.webtatic.com/packages/httpd-itk/

bashrc

# base-files version 3.7-1

# To pick up the latest recommended .bashrc content,
# look in /etc/defaults/etc/skel/.bashrc

# Modifying /etc/skel/.bashrc directly will prevent
# setup from updating it.

# The copy in your home directory (~/.bashrc) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benificial to all, please feel free to send
# a patch to the cygwin mailing list.

# User dependent .bashrc file


# Shell Options
# #############

# See man bash for more options...

# Don't wait for job termination notification
# set -o notify

# Don't use ^D to exit
# set -o ignoreeof

# Use case-insensitive filename globbing
# shopt -s nocaseglob

# Make bash append rather than overwrite the history on disk
# shopt -s histappend

# When changing directory small typos can be ignored by bash
# for example, cd /vr/lgo/apaache would find /var/log/apache
# shopt -s cdspell


# Completion options
# ##################

# These completion tuning parameters change the default behavior of bash_completion:

# Define to access remotely checked-out files over passwordless ssh for CVS
# COMP_CVS_REMOTE=1

# Define to avoid stripping description in --option=description of './configure --help'
# COMP_CONFIGURE_HINTS=1

# Define to avoid flattening internal contents of tar files
# COMP_TAR_INTERNAL_PATHS=1

# If this shell is interactive, turn on programmable completion enhancements.
# Any completions you add in ~/.bash_completion are sourced last.
case $- in
*i*) [[ -f /etc/bash_completion ]] && . /etc/bash_completion ;;
esac



# History Options
# ###############

# Don't put duplicate lines in the history.
# export HISTCONTROL="ignoredups"

# Ignore some controlling instructions
# export HISTIGNORE="[ ]*:&:bg:fg:exit"

# Whenever displaying the prompt, write the previous line to disk
# export PROMPT_COMMAND="history -a"


# Aliases
# #######

# Some example alias instructions
# If these are enabled they will be used instead of any instructions
# they may mask. For example, alias rm='rm -i' will mask the rm
# application. To override the alias instruction use a \ before, ie
# \rm will call the real rm not the alias.

# Interactive operation...
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'

# Default to human readable figures
# alias df='df -h'
# alias du='du -h'

# Misc :)
# alias less='less -r' # raw control characters
# alias whence='type -a' # where, of a sort
# alias grep='grep --color' # show differences in colour

~/bin/herastats.sh

# Some shortcuts for different directory listings
alias ls='ls -hF --color=tty' # classify files in colour
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'
alias ll='ls -l' # long list
alias la='ls -A' # all but . and ..
alias l='ls -CF' #


# Functions
# #########

# Some example functions
# function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }

#export DISPLAY=:0.0
export PS1="\w $ "
alias h=history
alias startx='startx -- -clipboard'
alias kdiff='svn diff --diff-cmd /cygdrive/c/Program\ Files/KDiff3/kdiff3.exe'
alias bdiff='svn diff --diff-cmd bc.sh'
alias sediff='svn diff --diff-cmd ediff.sh'
#alias psb='PowerStrip.exe /C8'
#alias load='tload_m6v2.exe /oemm6dev /c2576WH,RBF7WX,JHK8KN,MWRTF4,7WM32K,CHINOOKTEST 4 /b460800 /R_8_1'
#alias load4='tload.exe /oemm6dev /cX35X7C,NDHDMB,BN9ZPJ,WMGF2W,M74P99,ME4 4 /b460800 /R_8_1'
#alias load3='tload.exe /oemm6dev /cX35X7C,NDHDMB,BN9ZPJ,WMGF2W,M74P99,ME4 3 /b460800 /R_8_1'
#alias load4='tload.exe /oemm6dev /cP5P3M6,K846JC,HK9Z5R,HZTW79,KJWK4W,ME4 4 /b921600 /R_8_1'
#alias load3='tload.exe /oemm6dev /cP5P3M6,K846JC,HK9Z5R,HZTW79,KJWK4W,ME4 3 /b921600 /R_8_1'
alias emacs='/cygdrive/c/tools/emacs-23.2/bin/runemacs.exe'
alias buildtags4='find . c:/tools/GHS/arm424a/ansi/ -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.hpp' -o -name '*.arm' -name '*.ghs' -o -name '*.s' |xargs etags --extra=+q --fields=+fksaiS --c++-kinds=+px --append'
alias buildtags='find . c:/tools/GHS/arm506/ansi/ c:/tools/GHS/int1002 -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.hpp' -o -name '*.arm' -name '*.ghs' -o -name '*.s' |xargs etags --extra=+q --fields=+fksaiS --c++-kinds=+px --append'
alias ports='grep 3389 /cygdrive/c/WINDOWS/system32/LogFiles/PortReporter/*'
alias bittwist='~/packages/bittwist-1.0/bin/bittwist.exe'
alias bittwiste='~/packages/bittwist-1.0/bin/bittwiste.exe'
alias backup='rsync -av --exclude "vmware" /cygdrive/g/ /cygdrive/c/backup/'
alias wholockme='/cygdrive/c/Program\ Files/WhoLockMe/WhoLockMe.exe'
alias dbser='cpterm.exe /c5 /b115200 /echo:off'
alias hexdump=' od -t x1 -w16' # followed by file name
alias winzip='/cygdrive/c/Program\ Files/WinZip/WINZIP32.EXE -min'
alias sigclient='pkill -SIGUSR1 nclient'
alias sigserver='pkill -SIGUSR1 nserver'
alias flashdns='ipconfig /flushdns'
alias tshark='/cygdrive/c/Program\ Files/Wireshark/tshark.exe'
alias dumpcap='/cygdrive/c/Program\ Files/Wireshark/dumpcap.exe'
alias msbuild='/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v4.0.30319/Msbuild.exe'
alias nconvert='/cygdrive/o/Algorithms/Utils/nconvert-m6.exe'
alias ps=procps
alias setarp='arp -s 10.4.44.179 00-21-66-00-05-80'
#dumpcap -i 3 -w dump.pcap -b filesize:100000 -B50 -f tcp
#tshark -b duration:60 -B 100 -i 3 -q -w test.pcap

#net stop dnscache

#cd iMXr4n; svn export . ../../../winzip/ethernet_again_32bit
#cd ../../../winzip/;winzip -a -r -p ../for_ed/ethernet_again_receivingC.zip ethernet_again_receivingC
#svn diff --summarize -r 84:98

# svn propedit svn:ignore .
# svn propset svn:ignore '*.exe' .

ediff() {
emacs --eval "(ediff-files \"$1\" \"$2\")"
}

emerge() {
# dest src base; then cx-cw to overwrite the file in $1
emacs --eval "(ediff-merge-files-with-ancestor \"$1\" \"$2\" \"$3\")"
}

emerge_file() {
# filename destdir srcdir basedir; then cx-cw to overwrite the file in $1
# emerge_file src ../pri/src ../../../builds/1.3.0.0.14/src radio/generic.hpp
emacs --eval "(ediff-merge-files-with-ancestor \"$1/$4\" \"$2/$4\" \"$3/$4\")"
}



emacs configuration

elisp folder

total used in directory 577 available 129950416
drwxrwxrwx 1 user Domain Users 0 07-05 11:19 .
drwxrwxrwx 1 user Domain Users 0 07-29 13:31 ..
-rw-rw-rw- 1 user Domain Users 248669 2006-07-03 clearcase.el
-rw-rw-rw- 1 user Domain Users 79149 2010-08-13 csharp-mode.el
-rw-rw-rw- 1 user Domain Users 31496 2010-07-13 cygwin-mount.el
-rw-rw-rw- 1 user Domain Users 24621 2010-07-13 cygwin-mount.el.bad
-rw-rw-rw- 1 user Domain Users 12155 2009-10-01 devices.el
-r--r--r-- 1 user Domain Users 7179 2009-10-01 gnuserv-compat.el
-r--r--r-- 1 user Domain Users 29816 2009-10-01 gnuserv.el
-rw-rw-rw- 1 user Domain Users 7247 2006-07-03 imenu-go.el
-rw-rw-rw- 1 user Domain Users 1382 2006-07-03 insert-box-suffix.el
-rw-rw-rw- 1 user Domain Users 1381 2006-07-03 insert-box.el
-rw-rw-rw- 1 user Domain Users 10347 2010-08-06 interface.el
-rw-rw-rw- 1 user Domain Users 130198 2004-06-11 p4.el
-rw-rw-rw- 1 user Domain Users 7152 2010-04-07 safescrollmouse.el


.emacs file

(setq load-path (append (list "C:/cygwin/home/Username/elisp"
)
load-path))

(setq inhibit-startup-message t)

;(setq debug-on-error t)


(load-library "p4")

;; delay middle mouse button paste
(load "safescrollmouse")
(safescrollmouse-install)

;;;;
;;;; cygwin support
;;;;

;; Sets your shell to use cygwin's bash, if Emacs finds it's running
;; under Windows and c:\cygwin exists. Assumes that C:\cygwin\bin is
;; not already in your Windows Path (it generally should not be).
;;
(let* ((cygwin-root "c:/cygwin")
(cygwin-bin (concat cygwin-root "/bin")))
(when (and (eq 'windows-nt system-type)
(file-readable-p cygwin-root))

(setq exec-path (cons cygwin-bin exec-path))
(setenv "PATH" (concat cygwin-bin
";"
"/usr/bin:"
"/cygdrive/c/WINDOWS/system32:"
(getenv "PATH")))

;; By default use the Windows HOME.
;; Otherwise, uncomment below to set a HOME
(setenv "HOME" (concat cygwin-root "/home/Username"))

;; NT-emacs assumes a Windows shell. Change to baash.
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name)
(setq explicit-shell-file-name shell-file-name)

(setq exec-path (append (list
"c:/cygwin"
"c:/cygwin/bin"
"/usr/bin"
"c:/cygwin/usr/local/bin"
)
exec-path))

;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)))

;; environment setups
;(progn
; (setenv "HOME" "c:/cygwin/home/Username")
; (setenv "USERNAME" "machine")
; below used by compile "make, grep...."
; (setenv "PATH" (concat "/usr/bin:"
; "/cygdrive/c/WINDOWS/system32:"
; (getenv "PATH")))
; (setenv "WIND_BASE" "C:/Tornado")
; (setenv "WIND_HOST_TYPE" "x86-win32"))

; shell stuff
; For the interactive shell
; (setq explicit-shell-file-name "c:\cygnus\cygwin-b20\cygnus.bat")
; For subprocesses invoked via the shell (e.g., "shell -c command")
;(setq shell-file-name "C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\sh.exe")
(progn
(setq shell-file-name "bash.exe")
(setq explicit-shell-file-name shell-file-name)
(setq explicit-sh-args '("-i"))
(setq shell-command-switch "-c")
(setenv "SHELL" shell-file-name)
(setq win32-quote-process-args t)
(setq win32-enable-italics t)
(setq comint-process-echoes nil)
)

;; cygwin
(require 'cygwin-mount)
(require 'csharp-mode)

(cygwin-mount-activate)

(add-hook 'comint-output-filter-functions
'shell-strip-ctrl-m nil t)
(add-hook 'comint-output-filter-functions
'comint-watch-for-password-prompt nil t)

(setq shell-file-name explicit-shell-file-name)

;; c++ mode list
(setq auto-mode-alist (append
'(("\\.hpp$" . c++-mode)
("\\.el$" . emacs-lisp-mode)
("\\.tex$" . latex-mode)
("\\.texinfo$" . texinfo-mode)
("\\.lsp$" . lisp-mode)
("\\.scm$" . lisp-mode)
("\\.pl$" . perl-mode)
("\\.pm$" . perl-mode)
("\\.html$" . html-helper-mode)
("\\.cs$" . csharp-mode)
("\\.java$" . java-mode))
auto-mode-alist))

; csharp
;(defun my-csharp-mode-fn ()
; "function that runs when csharp-mode is initialized for a buffer."
; ...insert your code here...
; ...most commonly, your custom key bindings ...
;)
;(add-hook 'csharp-mode-hook 'my-csharp-mode-fn t)

;; restore space
(if (>= emacs-major-version 22)
(if partial-completion-mode
(progn
(define-key minibuffer-local-must-match-filename-map
(kbd "SPC") 'PC-complete-word)
(define-key minibuffer-local-filename-completion-map
(kbd "SPC") 'PC-complete-word))
(define-key minibuffer-local-must-match-filename-map
(kbd "SPC") 'minibuffer-complete-word)
(define-key minibuffer-local-filename-completion-map
(kbd "SPC") 'minibuffer-complete-word)))


;; C# style
(defconst csharp-style
'(
(c-set-style . "java")
(c-hanging-braces-alist . ((brace-list-open before after)
(block-open before after)
(substatement-open before after)
(block-close . c-snug-do-while)
(statement-case-open before after)
(brace-list-intro before after)
(brace-list-entry before after)
))
(substatement-open . 0)
(c-indent-level 4)
(c-brace-imaginary-offset 0)
(c-brace-offset -4)
(c-argdecl-indent 4)
(c-label-offset -4)
;(c-continued-statement-offset 4)
(indent-tabs-mode nil)
(c-tab-width . 4)
(c-basic-offset . 4)
(comment-multi-line t)
)
"C# Style"
)

;; C/C++/Java/C# Mode
(defun my-c-mode-common-hook ()
(c-set-offset 'substatement-open 0)
(c-set-offset 'statement-cont 4)
(c-set-offset 'topmost-intro-cont 0)
(c-set-offset 'block-open 0)
(c-set-offset 'arglist-intro 4)
(c-set-offset 'arglist-cont-nonempty 4)
;(local-unset-key (kbd "{"))
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)


;;================================================ ============
;; minibuffer space completion
;;================================================ ============
(define-key minibuffer-local-filename-completion-map (kbd "SPC")
'minibuffer-complete-word)

(define-key minibuffer-local-must-match-filename-map (kbd "SPC")
'minibuffer-complete-word)

(load "interface")
(autoload 'insert-box "insert-box" "insert at beginning or end of a line" t)
(autoload 'insert-suffix "insert-box" "insert at beginning or end of a line" t)

(setq make-backup-files nil) ; do NOT make backup files
(line-number-mode 1)
(setq visible-bell t)
(scroll-bar-mode -1) ; no scroll bars for windows
(setq query-replace-highlight t) ; highlight query replace
(setq ispell-highlight t)
(setq search-highlight t)
(setq text-mode-hook '(lambda () (auto-fill-mode 1)))
(setq buffers-menu-max-size 30)
(setq default-major-mode 'text-mode)
(add-hook 'mail-setup-hook 'mail-abbrevs-setup)
(setq find-grep-options "-n")
(setq grep-find-command "find . -type d '(' -name .kwlp -o -name .kwps -o -name .svn ')' -prune -o -type f -name '*.[shcparm]*'| xargs grep -n -e ")
;(setq grep-find-command "find . -type f -print | grep -v '.kwlp'| grep -v '.kwps'| xargs grep -n -e ")
(setq grep-command "grep -E -n -e ")
;(setq grep-command "find . -type f -print | xargs grep -E -n -e ")
(setq compilation-window-height 20)
;;; imenu setups ...
(setq imenu-max-items 50) ;; imenu buffer size
(setq ediff-diff-option "-w")
(setq imenu-sort-function 'imenu--sort-by-name)
(autoload 'imenu-go-find-at-position "imenu-go"
"Go to the definition of the current word." t)
(autoload 'imenu-go--back "imenu-go"
"Return back to a position saved during `imenu-go-find-at-position'." t)

;;; and bindings like

(global-set-key [M-S-mouse-2] 'imenu-go-find-at-position)
(global-set-key "\e\"" 'imenu-go-find-at-position)
(global-set-key [M-S-C-mouse-2] 'imenu-go--back)
(global-set-key "\e'" 'imenu-go--back) ; Conflicts with defined key.
;(global-set-key [?\C-\"] 'imenu-go--back)

;;; to your .emacs file. The usability if this package decreases a lot
;;; unless you have a simple access to `imenu', like in

(global-set-key [M-S-down-mouse-3] 'imenu)

;(setq lpr-switches '("-P" "YOUR_DOUBLE_SIDED_QUEUE_HERE"))
;(setq printer-name "//bcarydbd/Tek 360") ; network printer
;(setq printer-name "//prntsrv2/Research") ; network printer
(setq printer-name "//prntsrv2/SPAN1") ; network printer
(setq ps-line-number t)
(eval-expression (quote (setq c-macro-preprocessor "D:/cygwin/bin/cpp.exe -C")) nil)
;(setq tags-file-name "~/elisp/TAGS")
(defun compilation-buffer-name-uniquely (major-mode-name) ; generate *almost* unique names for compilation buffer
(concat "*" (downcase major-mode-name) "-" (buffer-name) "*")
) ; compilation-buffer-name-uniquely
(setq compilation-buffer-name-function 'compilation-buffer-name-uniquely)
;; general environment variables setup
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(uniquify-buffer-name-style (quote post-forward) nil (uniquify))

)


(mykeypad)

(defconst my-c-style
'(
(c-tab-always-indent . t)
(c-hanging-braces-alist . ((brace-list-open before after)
(block-open before after)
(substatement-open before after)
(block-close . c-snug-do-while)
(statement-case-open before after)
(brace-list-intro before after)
(brace-list-entry before after)
))
(c-hanging-colons-alist . ((label after)
(case-label after)
))
(c-offsets-alist . ((statement . 0)
; (access-label . 0) ; inclass 'public'
; (topmost-intro . 3) ; top level indent
(statement-cont . 0)
(block-open . 0)
(brace-list-open . 0)
(brace-list-intro . 3)
(brace-list-entry . 0)
(statement-block-intro . 3)
(statement-case-intro . 3)
(statement-case-open . 0)
(defun-block-intro . 3)
(substatement . 3)
(substatement-open . 0)
(label . 3)
(case-label . 3)
(inline-open . 0)
(arglist-cont-nonempty
. c-lineup-arglist)
(arglist-close
. c-lineup-arglist-close-under-paren)
(arglist-intro
. c-lineup-arglist-intro-after-paren)
(arglist-cont
. c-lineup-arglist-intro-after-paren)
))
(c-echo-syntactic-information-p . t)
(c-hanging-comment-ender-p . nil)
(c-hanging-comment-starter-p . nil)
(fill-column . 80)
(tab-width . 3)
(c-basic-offset . 3)
(comment-column . 45)
(indent-tabs-mode . nil)
(c-macro-prompt-flag . t)
)
"Personal C Programming Style")

;(setq text-mode-hook '(lambda () (auto-fill-mode 1) (font-lock-mode 1) (font-lock-fontify-buffer)))
(add-hook 'dired-mode-hook '(lambda () (font-lock-mode 1) (font-lock-fontify-buffer)))
(add-hook 'shell-mode-hook '(lambda () (font-lock-mode 1) (font-lock-fontify-buffer)))
;(add-hook 'c-mode-hook '(lambda () (font-lock-mode 1) (font-lock-fontify-buffer)))
(add-hook 'c-mode-hook (lambda ()
(setq c-basic-offset 3)
(setq c-macro-prompt-flag t)
(setq indent-tabs-mode nil)
(imenu-add-to-menubar "Functions")
(c-add-style "PERSONAL" my-c-style t)
(font-lock-mode 1) (font-lock-fontify-buffer)))
(add-hook 'c++-mode-hook (lambda ()
(setq c-basic-offset 3)
(setq c-macro-prompt-flag t)
(setq indent-tabs-mode nil)
(c-add-style "PERSONAL" my-c-style t)
(imenu-add-to-menubar "Functions")
(font-lock-mode 1) (font-lock-fontify-buffer)))
;(setq text-mode-hook '(lambda () (auto-fill-mode 1)))
(setq default-major-mode 'text-mode)
(setq c-macro-cppflags "-I /Tornado/target/h ")
(setq c-brace-offset 0)
(setq c-brace-imaginary-offset 0)

;; prevent accidently kill the shell buffer
(add-hook 'shell-mode-hook
(lambda()
;; make-local-hook doesn't work (yet?) for 'kill-buffer-hook,
;; so use make-local-variable instead:
(make-local-variable 'kill-buffer-hook)
(add-hook 'kill-buffer-hook
(function (lambda ()
(if (y-or-n-p
(format "Are you sure? "))
(message "");i.e. go ahead, and clear
; minibuffer
(error "Not killing shell buffer")))))))

;; gnus stuff
;(setq gnus-check-new-newsgroups nil)
;(setq gnus-read-active-file 'some)
;(setq gnus-thread-hide-subtree t)
;(setq user-full-name "colin")
;(setq user-mail-address "colin@spamthere.com") ;; mail-host-address
;(setq user-real-login-name "new")


;;;;SuperCite
(autoload 'sc-cite-original "supercite" "Supercite 3.1" t)
(autoload 'sc-submit-bug-report "supercite" "Supercite 3.1" t)
(add-hook 'mail-citation-hook 'sc-cite-original)
(setq news-reply-header-hook nil)
(setq sc-cite-region-limit t)
(setq-default sc-citation-leader " ")
(setq sc-auto-fill-region-p nil)

Interview Questions

AJAX:
http://programming-questions.blogspot.com/2008/04/ajax.html
JavaScript:
http://programming-questions.blogspot.com/2008/04/javascript.html
C++:
http://www.cplus-interview-questions.blogspot.com/
http://www.shettysoft.com/
C#:
http://programming-questions.blogspot.com/2008/04/c-interview-questions-1.html
PHP
http://www.kovasys.com/ForJobSeekers/ITInterviewQuestions/PHPInterviewQuestions/tabid/149/language/en-US/Default.aspx
Many:
http://www.globalguideline.com/interview_questions/Details.php?c=Basic_Programming_Interview_Questions_and_Answers

WPC 11 under Fedora 14

WPC 11 works fine with hostap_cs without being managed by NetworkManager. As soon as it is aded under NetworkManager, it stops working. Not sure why...

setroubleshoot: SELinux is preventing /sbin/ifconfig from read access on the file /var/run/vmware-active-nics

$ sealert -l 3e0f34bc-787a-4288-bde3-8bca65306491
SELinux is preventing /sbin/ifconfig from read access on the file /var/run/vmware-active-nics.

***** Plugin restorecon (99.5 confidence) suggests *************************

If you want to fix the label.
/var/run/vmware-active-nics default label should be vmware_host_pid_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/run/vmware-active-nics

***** Plugin catchall (1.49 confidence) suggests ***************************

If you believe that ifconfig should be allowed read access on the vmware-active-nics file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep /sbin/ifconfig /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

SELinux is preventing /sbin/ifconfig "search" access for ddclient

per https://bugzilla.redhat.com/show_bug.cgi?id=657947

sudo semanage permissive -a ddclient_t