Skip to content

Instantly share code, notes, and snippets.

@lauct
lauct / vultr-bandwidth-monitor-index.php
Created June 22, 2018 05:37 — forked from mashirozx/vultr-bandwidth-monitor-index.php
A php page shows Vultr's VPS bandwidth usage.
<?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) {
@lauct
lauct / BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
Created February 6, 2018 09:14 — forked from ccstone/BBEdit-TextWrangler_RegEx_Cheat_Sheet.txt
BBEdit-TextWrangler Regular Expression Cheat-Sheet
————————————————————————————————————————————————————————————————————————————————————————————————————
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.
@lauct
lauct / taaze_gift.csv
Created October 22, 2015 10:46 — forked from elleryq/taaze_gift.csv
http://www.taaze.tw/gift_index.html 抓出來的所有書名與網址
We can't make this file beautiful and searchable because it's too large.
"繞繞繞繞口令","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"
@lauct
lauct / hack.sh
Created August 11, 2012 01:12 — forked from khsing/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#