Skip to content

Instantly share code, notes, and snippets.

View wuzhonglin's full-sized avatar

wuzhonglin

  • tokyo
View GitHub Profile
@wuzhonglin
wuzhonglin / readme.md
Created January 1, 2021 15:27
amplify react aws appsync PWA
@wuzhonglin
wuzhonglin / readme.md
Created January 1, 2021 15:24
rails with react infos
@wuzhonglin
wuzhonglin / gist:f472b824b1fbe3202d28445452e3e72b
Created January 1, 2021 13:00
create react with service-worker
npx create-react-app my-app --template cra-template-pwa
@wuzhonglin
wuzhonglin / pwa.md
Created November 30, 2020 14:12
PWA
@wuzhonglin
wuzhonglin / webpack.md
Created November 30, 2020 14:10
babel, webpack, react
@wuzhonglin
wuzhonglin / gist:bd5c3c592cb2c5c1ebe93abd5d986af1
Last active November 30, 2020 14:06
nodejs, express liks
@wuzhonglin
wuzhonglin / gist:47d5214314a8e39e3e518418d5531549
Created October 25, 2020 15:42 — forked from siliconsocket/gist:ae72ad29b3ef8430efc229d1a7a42862
Mobile device detection in Nginx with just 7 lines of configuration
### Testing if the client is a mobile or a desktop.
### The selection is based on the usual UA strings for desktop browsers.
## Testing a user agent using a method that reverts the logic of the
## UA detection. Inspired by notnotmobile.appspot.com.
map $http_user_agent $is_desktop {
default 0;
~*linux.*android|windows\s+(?:ce|phone) 0; # exceptions to the rule
~*spider|crawl|slurp|bot 1; # bots
~*windows|linux|os\s+x\s*[\d\._]+|solaris|bsd 1; # OSes
@wuzhonglin
wuzhonglin / gist:a0e4ddaacd348d3ce46e32e57eb3a4dd
Created January 2, 2017 06:22
CUIから以下のコマンドを使えばランダムな文字生成
cat /dev/urandom | tr -dc '[:alnum:]' | head -c 16
@wuzhonglin
wuzhonglin / apache_log_ruby.rb
Last active September 3, 2015 08:57 — forked from hiroyuki-sato/apache_log_ruby.rb
Apache Log Parser Plugin
require 'apache_log/parser'
module Embulk
module Parser
class Apache_log_rubyParserPlugin < ParserPlugin
Plugin.register_parser("apache_log_ruby", self)
STRING_FIELDS = %w[ remote_host identity_check user status size ].map{|x| x.to_sym }
REQUEST_FIELDS = %w[ method path protocol ].map{ |x| x.to_sym }
@wuzhonglin
wuzhonglin / gist:24b3394188d9accc8ae3
Last active August 29, 2015 14:23
画像処理ライブラリvipsの導入
# install library
wget http://www.vips.ecs.soton.ac.uk/supported/current/vips-8.0.2.tar.gz
tar zxf vips-8.0.2.tar.gz
cd vips-8.0.2
yum install glib2-devel
yum install libxml2-devel
yum install libpng-devel
yum install libtiff-devel
yum install libjpeg-devel
yum install libwebp-devel