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 <windows.h> | |
#include <stdio.h> | |
//char root_path[] = "image.wrp"; | |
char root_path[] = "image.wrp_2.33"; | |
//char root_path[] = "/etc/tftp/image.wrp"; | |
//char root_path[] = "/etc/tftp/image.wrp_2_33"; | |
static char trimrootpath(char* filename, char* version) | |
{ |
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 <string.h> | |
int main(int argc, char* argv[]) | |
{ | |
char *szFilename = 0; | |
FILE *fp; | |
unsigned long data; |
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
/*桃子的问题 | |
1毛钱可以买一个桃子,每3个桃核可以换一个桃 | |
问n元钱总共可以吃到多少个桃子 | |
Author:jason | |
Date:2006.12.23 | |
来源于群中的一个脑筋急转弯的问题。可用递归算法实现 | |
*/ | |
#include <stdio.h>; |
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 | |
channel_cmd="ipmitool channel info" | |
lan_cmd="ipmitool lan print" | |
function is_lan_channel() | |
{ | |
local chan=$1 | |
$channel_cmd $chan 2>&1 | grep LAN -q | |
if [[ $? -eq 0 ]]; then | |
return 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 | |
proxy=127.0.0.1:7777 | |
http_proxy=$proxy https_proxy=$proxy $@ |
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 | |
wifi="Wi-Fi" | |
IP=127.0.0.1 | |
PORT=7777 | |
[[ $# -ne 1 ]] && echo "$0 http|pac|disable" && exit 1 | |
flag=$1 | |
function webproxy_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/bash | |
size=1024 | |
usage() { | |
echo "$0: Create RAM Disk with given size(default is 1024MB)" | |
echo " e.g.: $0 512" | |
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 | |
mount_disk() | |
{ | |
sudo umount $disk | |
mkdir ~/Desktop/$diskname | |
sudo mount_ntfs -o rw,auto,nodev,nobrowse,noowners,noatime $disk ~/Desktop/$diskname | |
echo "Mount $disk to ~/Desktop/$diskname" | |
open ~/Desktop/$diskname | |
} |
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
ACTION=="change", SUBSYSTEM=="backlight", RUN+="/usr/sbin/intelbacklight.sh" |
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
# Maintainer: Jason <jsfaint@gmail.com> | |
pkgname=headset_hotplug | |
pkgver=0.2 | |
pkgrel=1 | |
pkgdesc="Auto disable/enable Speaker when headset plugin/unplugin" | |
arch=('any') | |
license=("GPL") | |
source=("headset_hotplug" "headset_hotplug.sh") |