Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| BINS:= mpi greetings omp hybrid | |
| all: $(BINS) | |
| mpi: mpi-hello.c | |
| mpicc -o mpi mpi-hello.c | |
| greetings: mpi-greetings.c | |
| mpicc -o greetings mpi-greetings.c |
| /** | |
| * 身份证号码验证 | |
| * | |
| */ | |
| function isIdCardNo(num) { | |
| var factorArr = new Array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1); | |
| var parityBit=new Array("1","0","X","9","8","7","6","5","4","3","2"); | |
| var varArray = new Array(); | |
| var intValue; |
| CC = gcc | |
| CFLAGS = -O2 -g -Wall | |
| INSTALL_DIR = /usr/bin | |
| .PHONY: clean install uninstall | |
| all: server client | |
| server: udp-server.c | |
| $(CC) udp-server.c -o udp-server |
| #!/bin/sh | |
| VIDEO_DIR=${HOME}/Videos | |
| VIDEO_TIME=`date +'%Y%m%d%H%M%S'` | |
| VIDEO_SUFFIX=mkv | |
| VIDEO_FILE=${VIDEO_DIR}/${VIDEO_TIME}.${VIDEO_SUFFIX} | |
| if [ ! -e ${VIDEO_DIR} ]; then | |
| mkdir -p ${VIDEO_DIR} | |
| fi |
| [global] | |
| workgroup = WORKGROUP | |
| security = user | |
| map to guest = bad user | |
| create mask = 0644 | |
| directory mask = 0755 | |
| [pub] | |
| path = /public | |
| browseable = yes |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| git config --global https.proxy http://127.0.0.1:1080 | |
| git config --global https.proxy https://127.0.0.1:1080 | |
| git config --global --unset http.proxy | |
| git config --global --unset https.proxy | |
| npm config delete proxy |
opkg install kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-storage e2fsprogs fdisk usbutils mount-utils block-mount kmod-fs-ext4 kmod-fs-vfat kmod-nls-utf8 kmod-nls-cp437 kmod-nls-iso8859-1
rebootblkid, run opkg update && opkg install blkid;block.sh to directory /lib/functions;10-mount and 20-swap to directory /etc/hotplug.d/block;logread -f command then plug in a USB stick to test.| # fastboot protocol on HiKey | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d00d", MODE="0660", GROUP="dialout" | |
| # adb protocol on HiKey | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1057", MODE="0660", GROUP="dialout" | |
| # rndis for HiKey | |
| SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", ATTR{idProduct}=="1050", MODE="0660", GROUP="dialout" |
| /etc/udev/rules.d/90-tty-usb.rules | |
| # CP210x | |
| SUBSYSTEMS=="usb", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="0666" | |
| How to add udev rule for usb serial device | |
| [huzhifeng@CentOS72 ~]$ minicom | |
| Cannot create lockfile for /dev/ttyUSB0: 权限不够 | |
| [huzhifeng@CentOS72 ~]$ su root -l | |
| [root@CentOS72 ~]# ls -al /dev/ttyUSB0 | |
| crw-rw---- 1 root dialout 188, 0 8月 22 08:59 /dev/ttyUSB0 |