Skip to content

Instantly share code, notes, and snippets.

View int64ago's full-sized avatar
🎯
Focusing

Cody Chan int64ago

🎯
Focusing
View GitHub Profile
----- BEGIN LICENSE -----
Andrew Weber
Single User License
EA7E-855605
813A03DD 5E4AD9E6 6C0EEB94 BC99798F
942194A6 02396E98 E62C9979 4BB979FE
91424C9D A45400BF F6747D88 2FB88078
90F5CC94 1CDC92DC 8457107A F151657B
1D22E383 A997F016 42397640 33F41CFC
E1D0AE85 A0BBD039 0E9C8D55 E1B89D5D
@int64ago
int64ago / centos_rsync.sh
Last active August 29, 2015 14:11
Centos rsync script
#!/bin/bash
#wget works, too
#wget -r -p -k -np -c -nH --cut-dirs=1 -e robots=off -t5 -R iso,gif,css,js,ico,png,html,1 -P /srv/http/centos/ http://mirrors.aliyun.com/centos/6.5/
RsyncBin="/usr/bin/rsync"
RsyncPerm='-avrt --delete --exclude=isos/ --exclude=i386/'
Version=6.5 #depends
Target='/srv/http/centos/$Version/' #depends
Repo='rsync://mirrors.kernel.org/centos/$Version/'
LogFile='/srv/http/centos/log' #depends
Date=`date +%Y-%m-%d`
@int64ago
int64ago / lookfor.sh
Last active August 29, 2015 14:11
Find the substring from all files of current directory recursively
#!/bin/bash
path='.'
keyword=$1
function deep(){
for file in `ls $1` ; do
if test -d $1"/"$file ; then
deep $1"/"$file
else
cat $1"/"$file | grep $keyword > /dev/null
@int64ago
int64ago / myservice.sh
Last active August 29, 2015 14:11
sysvinit service example for python script
#!/bin/bash
#
# myservice Start up myservice
#
# chkconfig: 2345 55 25
# description: This's the description
#
# processname: myservice
# Source function library
@int64ago
int64ago / AES.c
Created August 25, 2014 08:25 — forked from bricef/AES.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
* MCrypt API available online:
* http://linux.die.net/man/3/mcrypt
*/
#include <mcrypt.h>