Test if the website is down http://ce.cloud.360.cn/ There are many tools that can monitor whether a website is down? Of course, V2EX is also one of them. When a website is inaccessible, there are many reasons? GFW? Your own network? The website itself? It is difficult to find out whether the website is down by yourself. There are too many such tools. I have selected the following tools for reference only.
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
# Reset | |
RESET='\033[0m' # Text Reset | |
# Special Colors | |
C='\033[0;2m' # Default color setting | |
CB='\033[0;1m' # Default color setting and bright a little bit | |
# Regular Colors | |
BLACK='\033[0;30m' # Black | |
RED='\033[0;31m' # Red |
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
// [START initialize_firebase_in_sw] | |
// Give the service worker access to Firebase Messaging. | |
// Note that you can only use Firebase Messaging here, other Firebase libraries | |
// are not available in the service worker. | |
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-app.js'); | |
importScripts('https://www.gstatic.com/firebasejs/3.5.2/firebase-messaging.js'); | |
// Initialize the Firebase app in the service worker by passing in the | |
// messagingSenderId. | |
firebase.initializeApp({ |
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
/** | |
* The pseudo-element 'content' property doesnt accept normal (») style | |
* HTML entities. These variables below easy the pain of looking up the HEX codes... | |
* | |
* Referenced from http://www.danshort.com/HTMLentities/ | |
* | |
* TODO: Add all the other entities? Worth it? Some day? Maybe? | |
*/ | |
// Punctuation |
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
# load dynamic modules | |
load_module /etc/nginx/modules/ngx_http_geoip_module.so; | |
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log info; | |
pid /var/run/nginx.pid; | |
events { worker_connections 1024; } | |
http { |
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
# Solution 1 | |
# Use only codes greater than 418, do not use common status codes 404, 402, 403, etc | |
location /location1 { | |
error_page 463 = @app; return 463; | |
} | |
# Solution 2 (drawbacks unknown) | |
location /location2 { | |
try_files /dev/null @app; | |
} |
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
# Solution 1 | |
# Use only codes greater than 418, do not use common status codes 404, 402, 403, etc | |
location /location1 { | |
error_page 463 = @app; return 463; | |
} | |
# Solution 2 (drawbacks unknown) | |
location /location2 { | |
try_files /dev/null @app; | |
} |
No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
A Russian translation of this article can be found here, contributed by Timur Demin. There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
name old time/op new time/op delta | |
BinaryTree17 5.44s ± 2% 3.27s ± 2% -39.90% (p=0.000 n=20+19) | |
Fannkuch11 4.95s ± 2% 2.68s ± 2% -45.87% (p=0.000 n=20+20) | |
FmtFprintfEmpty 142ns ± 2% 49ns ± 3% -65.39% (p=0.000 n=20+18) | |
FmtFprintfFloat 765ns ± 2% 260ns ± 2% -66.02% (p=0.000 n=20+20) | |
FmtFprintfInt 341ns ± 2% 95ns ± 2% -72.08% (p=0.000 n=19+20) | |
FmtFprintfIntInt 554ns ± 2% 150ns ± 1% -72.95% (p=0.000 n=20+19) | |
FmtFprintfPrefixedInt 497ns ± 3% 178ns ± 3% -64.12% (p=0.000 n=20+20) | |
FmtFprintfString 466ns ± 2% 86ns ± 3% -81.54% (p=0.000 n=20+20) | |
FmtManyArgs 2.23µs ± 2% 0.59µs ± 1% -73.46% (p=0.000 n=20+17) |
NewerOlder