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
Factory reset mode | |
mke2fs 1.39 (29-May-2006) | |
Filesystem label= | |
OS type: Linux | |
Block size=4096 (log=2) | |
Fragment size=4096 (log=2) | |
942848 inodes, 1882520 blocks | |
37650 blocks (2.00%) reserved for the super user | |
First data block=0 | |
Maximum filesystem blocks=1929379840 |
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
NextVOD:~# cat /proc/meminfo | |
MemTotal: 83436 kB | |
MemFree: 69900 kB | |
Buffers: 72 kB | |
Cached: 1548 kB | |
SwapCached: 0 kB | |
Active: 2304 kB | |
Inactive: 680 kB | |
Active(anon): 1348 kB | |
Inactive(anon): 0 kB |
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<iostream> | |
using namespace std; | |
int main() | |
{ | |
int M,D,S; | |
while(cin>>M>>D){ | |
S=(M*2+D)%3; | |
if(S==0){ | |
cout<<"\n"<<"普通\n"; |
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
https://gist.github.com/bhwebworks/7233529 |
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
wget https://drive.google.com/uc?id=0B3X9GlR6EmbnMHBMVWtKaEZXdDg -O drive #下載編譯好的檔案,並命為 drive | |
chmod +x drive #給予 drive 執行權限 | |
mv drive /usr/local/bin/ #移動到 /usr/local/bin/ |
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
wget http://tpdb.speed2.hinet.net/test_400m.zip |
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
drive upload -f 檔案名稱 |
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
#/etc/apt/sources.list | |
deb [arch=all] http://debian.csie.nctu.edu.tw/debian/ wheezy main contrib non-free | |
deb-src http://debian.csie.nctu.edu.tw/debian/ wheezy main contrib non-free | |
deb [arch=all] http://debian.csie.ntu.edu.tw/debian/ wheezy main contrib non-free | |
deb-src http://debian.csie.ntu.edu.tw/debian/ wheezy main contrib non-free | |
deb [arch=sh4] http://download.si-linux.co.jp/debian-sh/wheezy-sh4/ wheezy main contrib non-free | |
deb-src http://download.si-linux.co.jp/debian-sh/wheezy-sh4/ wheezy main contrib non-free |
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 | |
#相關設定說明:https://goo.gl/K5ucXJ | |
#這隻小腳本應該可以丟掉OpenShift內的Cron功能跑,不用自己開機監控:http://www.cystc.org/?p=2940&lang=zh-tw | |
#判斷依據可以自己找適合的方法寫,如果是虛擬主機掛掉可能就不適合用Ping了,也可以用curl抓網頁字串是否存在來判斷存活 | |
ping -c 1 -w 10 主機A > /dev/null 2>&1 | |
if [ $? = 0 ] #判斷主機是否上線 | |
then #主機A上線,OK | |
echo "ServerA is live~" |
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. 安裝 apt-mirror。 | |
apt-get install apt-mirror | |
# 2. 編輯 apt-mirror 設定。 | |
vi /etc/apt/mirror.list | |
############# config ################## | |
set base_path /media/sdb1/debian-sh4 # 鏡像儲存位置,此處為外接硬碟。 | |
# set mirror_path $base_path/mirror |
OlderNewer