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 expect | |
set timeout 6 | |
set send_slow {1 .1} | |
spawn ./lanconf32 textmode | |
expect { | |
"Press any key to continue." {send -s " ";} |
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 <stdlib.h> | |
#include <signal.h> | |
void sig_handler(int signo) | |
{ | |
printf("Signal %d", signo); | |
exit(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
#!/bin/bash | |
PATTERN='^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$' | |
print_usage() { | |
echo "Need NIC name" | |
echo "usage: $0 eth0 00:11:22:33:44:55" | |
} | |
if [ -z $1 ]; then |
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 - | |
############################################################################### | |
# FILENAME: | |
# auto_sys_inst.sh | |
# | |
# DESCRIPTION: | |
# Build a live usb disk from rootfs.tgz | |
# | |
# REVISION(MM/DD/YYYY): | |
# 11/22/2011 jia.sui(jia.sui@advantech.com.cn) |
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 | |
# ----------------------------------------------- | |
# | |
# rpm_file.sh | |
# | |
# Description: Get type and RPM owner of files under a given path. | |
# | |
# usage: | |
# ./rpm_file.sh [PATH] | |
# param: |
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 | |
[ -z $1 ] && echo "Missging git src path" && exit 1 | |
git_src=$1 | |
cd $git_src | |
make prefix=/usr | |
sudo make prefix=/usr install |
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
let s:month = { | |
\ '1': 'Jan', | |
\ '2': 'Feb', | |
\ '3': 'Mar', | |
\ '4': 'Apr', | |
\ '5': 'May', | |
\ '6': 'Jun', | |
\ '7': 'Jul', | |
\ '8': 'Aug', | |
\ '9': 'Sep', |
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 | |
os=`uname` | |
if [[ x$os == x"Darwin" ]]; then | |
export PATH=/Library/Developer/CommandLineTools/usr/lib:$PATH | |
fi | |
cd ./vimfiles/bundle/youcompleteme/ | |
git submodule update --init --recursive |
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 | |
#author: Jia Sui | |
#email: jsfaint@gmail.com | |
#Description: Clean orphan sdr folder which books has been removed. | |
# Check if Kindle was mounted | |
df -h | grep -i kindle > /dev/null | |
if [[ $? -ne 0 ]]; then | |
echo "Kindle was not mounted" | |
exit 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 bash | |
sudo launchctl unload -w com.apple.discoveryd.plist | |
sudo launchctl load -w com.apple.discoveryd.plist |