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
<?php | |
error_reporting(E_ERROR); | |
ini_set("display_errors","Off"); | |
$request = "https://api.vultr.com/v1/server/bandwidth?SUBID=YOUR_SUBID&api_key=YOUR_API_KEY"; | |
$serviceInfo = json_decode(file_get_contents($request)); | |
$income = $serviceInfo->incoming_bytes; | |
$outgo = $serviceInfo->outgoing_bytes; | |
$sumin = 0; | |
$sumout = 0; | |
foreach ($income as $invalue) { |
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
———————————————————————————————————————————————————————————————————————————————————————————————————— | |
BBEDIT/TEXTWRANGLER REGULAR EXPRESSION GUIDE MODIFIED 2016/02/29 17:26 | |
———————————————————————————————————————————————————————————————————————————————————————————————————— | |
NOTES: | |
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use. | |
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete. |
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
systemctl stop mariadb.service | |
vim /etc/my.cnf | |
[mysqld] | |
#預設字元集為utf8 | |
character_set_server=utf8 | |
#設定連接mysql資料庫時使用utf8編碼,以讓mysql資料庫為utf8運行 | |
init_connect='SET NAMES utf8' |
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
#create tomcat user | |
sudo groupadd tomcat | |
sudo useradd -M -s /bin/nologin -g tomcat -d /opt/tomcat tomcat | |
wget http://ftp.twaren.net/Unix/Web/apache/tomcat/tomcat-8/v8.5.15/bin/apache-tomcat-8.5.15.tar.gz | |
sudo mkdir /opt/tomcat | |
sudo tar xvf apache-tomcat-8*tar.gz -C /opt/tomcat --strip-components=1 | |
# Update Permissions |
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
vagrant box add CentOS https://github.com/CommanderK5/packer-centos-template/releases/download/0.7.2/vagrant-centos-7.2.box | |
vagrant init CentOS | |
vagrant up | |
vagrant ssh |
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
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm" \ | |
-O jdk-8u131-linux-x64.rpm | |
sudo rpm -Uvh jdk-8u131-linux-x64.rpm | |
-- | |
vim /etc/environment |
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
tree -N |
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
brew cask install qlstephen qlcolorcode qlmarkdown quicklook-json qlprettypatch quicklook-csv betterzipql webpquicklook suspicious-package |
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
sudo tmutil delete /Volumes/drive_name/Backups.backupdb/old_mac_name | |
sudo tmutil delete /Volumes/drive_name/Backups.backupdb/mac_name/YYYY-MM-DD-hhmmss |
We can't make this file beautiful and searchable because it's too large.
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
"繞繞繞繞口令","http://www.taaze.tw/gift_sing.html?pid=81300014968" | |
"要活就要動!","http://www.taaze.tw/gift_sing.html?pid=81300014969" | |
"上海攻略-上海最値得","http://www.taaze.tw/gift_sing.html?pid=81300014971" | |
"中國現代作家選集8:","http://www.taaze.tw/gift_sing.html?pid=81300014973" | |
"會計學新論解答(全一","http://www.taaze.tw/gift_sing.html?pid=81300014977" | |
"屍鬼湖","http://www.taaze.tw/gift_sing.html?pid=81300014978" | |
"有效處理壓力的第一本","http://www.taaze.tw/gift_sing.html?pid=81300014873" | |
"鬼靈精一族","http://www.taaze.tw/gift_sing.html?pid=81300014874" | |
"我要擺脫煩惱","http://www.taaze.tw/gift_sing.html?pid=81300014875" | |
"詠春拳高級格鬥訓練","http://www.taaze.tw/gift_sing.html?pid=81300014876" |
NewerOlder