Skip to content

Instantly share code, notes, and snippets.

View Yinchie's full-sized avatar
♥️

Yee Chie Yinchie

♥️
View GitHub Profile
Verifying that +yeechie is my blockchain ID. https://onename.com/yeechie

Keybase proof

I hereby claim:

  • I am yinchie on github.
  • I am yeechie (https://keybase.io/yeechie) on keybase.
  • I have a public key whose fingerprint is 49C3 0DF3 6393 CD95 E93F A457 16CF E267 6760 8DB6

To claim this, I am signing this object:

@Yinchie
Yinchie / serverbench.log
Created December 11, 2016 12:04
Vultr Cloud Compute (VC2) | 15GB SSD 1 CPU 768MB RAM | VPS Benchmark using serverbench.
----------------------------------------------------------------------
CPU model : Virtual CPU 714389bda930
Number of cores : 1
CPU frequency : 2399.996 MHz
Total amount of ram : 740 MB
Total amount of swap : 1023 MB
System uptime : 3days, 0:10:45
Load average : 0.03, 0.04, 0.00
OS : Ubuntu 16.04.1 LTS
Arch : x86_64 (64 Bit)
@Yinchie
Yinchie / pagespeed.conf
Last active December 30, 2016 13:09
My Ghost blog, general NGiNX pagespeed config.
pagespeed on;
pagespeed FileCachePath /var/cache/nginx/pagespeed;
pagespeed FileCacheSizeKb 102400;
pagespeed FileCacheCleanIntervalMs 3600000;
pagespeed FileCacheInodeLimit 500000;
pagespeed XHeaderValue "optimized";
pagespeed EnableCachePurge on;
pagespeed ForceCaching on;
pagespeed MessageBufferSize 100000;
@Yinchie
Yinchie / proxy_pagespeed.conf
Last active December 31, 2016 11:25
My Ghost blog, NGiNX pagespeed config for specific "location"'s.
pagespeed RewriteLevel PassThrough;
pagespeed PreserveUrlRelativity on;
pagespeed NoTransformOptimizedImages on;
pagespeed EnableFilters rewrite_images,recompress_images,insert_image_dimensions;
pagespeed EnableFilters remove_comments,collapse_whitespace,extend_cache,convert_meta_tags;
pagespeed EnableFilters remove_quotes,insert_dns_prefetch;
pagespeed EnableFilters rewrite_css,fallback_rewrite_css_urls,rewrite_style_attributes,inline_css;
pagespeed EnableFilters rewrite_javascript;
@Yinchie
Yinchie / security_cors.conf
Created December 31, 2016 11:26
My Ghost blog, NGiNX CORS config.
if ($request_method = "OPTIONS") {
more_set_headers "Access-Control-Allow-Origin: www.itchy.nl";
more_set_headers "Access-Control-Allow-Methods: GET, POST, OPTIONS";
more_set_headers "Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type";
more_set_headers "Access-Control-Max-Age: 1728000";
more_set_headers "Content-Type: text/plain charset=UTF-8";
more_set_headers "Content-Length: 0";
return 204;
}
@Yinchie
Yinchie / nginx.conf
Last active January 6, 2017 22:43
nginx.conf (gist colors) = www.itchy.nl.conf - my optimized Nginx configuration for ghost blog
# main server
server {
listen 443 default_server fastopen=256 ssl http2;
listen [::]:443 fastopen=256 ssl http2 ipv6only=on;
charset utf-8;
server_name www.itchy.nl;
include /etc/nginx/includes/tls.conf;
# modify versions being displayed in http header.
more_set_headers "Server: www.itchy.nl";
@Yinchie
Yinchie / proxy.conf
Last active January 6, 2017 22:43
Nginx proxy config for each location /
proxy_hide_header Server;
proxy_hide_header X-Powered-By;
proxy_hide_header Etag;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
@Yinchie
Yinchie / nginx.conf
Last active February 17, 2017 22:48
Server block for my Jekyll generated website.
# main server
server {
listen 443 default_server fastopen=256 ssl http2;
listen [::]:443 fastopen=256 ssl http2 ipv6only=on;
server_name itchy.nl www.itchy.nl;
charset utf-8;
# Modify certain headers for security.
more_set_headers "Server: itchy.nl";
more_set_headers "X-Server-Admin: Yee Chie Tu";
@Yinchie
Yinchie / tls.conf
Last active February 17, 2017 22:50
My Ghost blog, NGiNX TLS configuration | X25519 & secp384r1 | RSA & ECDSA
# RSA certificate
ssl_certificate /path/rsa_fullchain.pem;
ssl_certificate_key /path/rsa-2048.key;
# ECDSA certificate
ssl_certificate /path/ec_fullchain.pem;
ssl_certificate_key /path/ec-secp384r1.key;
# DH (Diffie–Hellman)
ssl_dhparam /path/dhparam4096.pem;