This file contains hidden or 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/expect | |
| # require expect openssh | |
| # modify PORT USER HOST PASS | |
| set timeout 60 | |
| spawn /usr/bin/ssh -D PORT -g USER@HOST | |
| expect { | |
| "password:" { | |
| send "PASS\r" | |
| } |
This file contains hidden or 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> | |
| // swap 函数 | |
| void swap(int *a, int *b) { | |
| int tmp = *a; | |
| *a = *b; | |
| *b = tmp; | |
| } | |
| // 选择排序 |
This file contains hidden or 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
| // see : http://acm.nankai.edu.cn/p1010.html | |
| #include <stdio.h> | |
| #define MAX_SEAT 51 | |
| // 计算n个座的情况下第x号座和过道的距离。(x: 0~ n-1) | |
| int distance(int x, int n) { | |
| if(x < n/2) | |
| return x; | |
| else |
This file contains hidden or 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: Bartosz Chmura <chmurli at gmail dot com> | |
| pkgname=sublime-text-2 | |
| pkgver=2126 | |
| _build=2126 | |
| pkgrel=1 | |
| pkgdesc="sophisticated text editor for code, html and prose" | |
| arch=('i686' 'x86_64') | |
| url="http://www.sublimetext.com/2" | |
| license=('custom') |
This file contains hidden or 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> | |
| /* | |
| * 海滩上有一堆桃子,五只猴子来分,第一只猴子把这堆桃子平均分为五份,多了一个, | |
| * 这只猴子把多的一个扔到了海里,拿走了一份,第二只猴子把剩下的桃子又平均分成 | |
| * 五份,又多了一个,它同样把多的一个扔到了海里,拿走了一份,第三只,第四只,第 | |
| * 五只都是这样做的,问海滩上原来最少有多少桃子。使用递归编程求解。 | |
| */ | |
| #define MONKEY 5 | |
| // 由当前猴子数和最终剩下的桃数求出总桃数 |
This file contains hidden or 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
| function createXHR(){ | |
| return window.XMLHttpRequest? | |
| new XMLHttpRequest(): | |
| new ActiveXObject("Microsoft.XMLHTTP"); | |
| } | |
| function getappkey(url){ | |
| xmlHttp = createXHR(); | |
| xmlHttp.open("GET",url,false); | |
| xmlHttp.send(); | |
| result = xmlHttp.responseText; |
This file contains hidden or 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
| @echo off&color 1E&title IP地址快速切换器 | |
| echo ┌────────────────────────────┐ | |
| echo | | | |
| echo | 切换网络环境,请输入当前所在位置 │ | |
| echo | | | |
| echo └────────────────────────────┘ | |
| :choice | |
| set choice= | |
| set /p choice=【实验室无线】请选择1,【实验室有线】请选择2,【宿舍无线】请选择3,【宿舍有线】请选择4:[1,2,3,4]? |
This file contains hidden or 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
| pkgname=libqq-svn | |
| pkgver=161 | |
| pkgrel=1 | |
| arch=('i686' 'x86_64') | |
| url="http://code.google.com/p/libqq-pidgin/" | |
| pkgdesc="Latest QQ 2010 protocol for pidgin" | |
| license=('GPLv3') | |
| depends=() | |
| makedepends=('libpurple') | |
| conflicts=('libqq-pidgin') |
This file contains hidden or 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
| upstream ghs { | |
| ip_hash; | |
| server ghs.google.com; | |
| server 72.14.203.121; | |
| server 72.14.207.121; | |
| server 74.125.43.121; | |
| server 74.125.47.121; | |
| server 74.125.53.121; | |
| server 74.125.77.121; | |
| server 74.125.93.121; |
This file contains hidden or 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 | |
| # 参数1:延迟的时间,单位s | |
| # 参数2:需要执行的命令 | |
| # example: | |
| # delay 10 "conky -d" | |
| sleep $1 | |
| exec $2 |