Skip to content

Instantly share code, notes, and snippets.

View bingluen's full-sized avatar
🇹🇼

Erickson bingluen

🇹🇼
  • LINE Taiwan Limited
  • Taipei
View GitHub Profile
{
"title": "金融商品名稱"
"tag": ["醫療型", "回本型"] //這邊應該要定義成enum的數字,而不是字串
// 1:"投資型保單",2:"外幣型保單",3:"保障型保單",4:"死亡給付",5:"全殘給付",6:"醫療給付",7:"分紅保單"
"content": "商品介紹內文"
"graphic": [
//這邊以剛剛說的南山作為例子
{
"index": 0 //畫圖的順序
"incomePeriod": 20, //持續幾次,若這裡填20,而incomeFrequency填0 表示持續20年
var a = 0;
console.log("Line 3, a =", a);
var fun1 = (() => {
console.log("fun1, Line 6, a =", a);
})
var fun2 = (() => {
console.log("fun2, Line 10, a =", a);
@bingluen
bingluen / Install-nginx-with-http2-support.md
Created September 4, 2016 18:59 — forked from hollodotme/Install-nginx-with-http2-support.md
Install nginx with http2 support on ubuntu 14.04 LTS (Trusty)

How to install nginx (>= 1.9.5) with http2 support on Ubuntu 14.04 LTS (Trusty)

IMPORTANT: Backup your nginx site configs (usually under /etc/nginx/sites-available)!

Remove old nginx

Remove old nginx incl. nginx-common:

apt-get autoremove --purge nginx nginx-common
@bingluen
bingluen / AppBaseActivity.java
Created September 11, 2016 04:03
Android: Easiest way to reuse a common Navigation drawer among a group of activities.
/*
* This is a simple and easy approach to reuse the same
* navigation drawer on your other activities. Just create
* a base layout that conains a DrawerLayout, the
* navigation drawer and a FrameLayout to hold your
* content view. All you have to do is to extend your
* activities from this class to set that navigation
* drawer. Happy hacking :)
* P.S: You don't need to declare this Activity in the
* AndroidManifest.xml. This is just a base class.
@bingluen
bingluen / tossl.conf
Created October 8, 2016 05:25
Nginx to ssl setting
server {
listen 80;
listen [::]:80;
server_name domainName1 domainName2;
return 301 https://$host$request_uri;
}
# nvm, node, git
FROM centos:6.8
MAINTAINER Erickson Juang <a820224@gmail.com>
RUN yum -y groupinstall "Development Tools" \
&& yum -y install gettext-devel openssl-devel perl-CPAN perl-devel zlib-devel
RUN curl -L https://github.com/git/git/archive/v2.10.2.tar.gz | tar zx \
&& cd git-2.10.2 && make configure \
&& ./configure --prefix=/usr \
&& make install \
&& rm -rf git-v2.10.2
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style media="screen">
body {
background: #000;
color: #fff;

Usage

python convert2srt.py source_filename > output_filename
Host Loss% Snt Last Avg Best Wrst StDev
1. 10.1.1.1 24.5% 736 1.2 1.6 0.7 97.3 6.0
2. h254.s98.ts.hinet.net 0.0% 736 17.1 18.9 16.1 684.4 33.8
3. tpdt-3307.hinet.net 0.0% 736 16.6 22.0 16.1 608.0 36.4
4. TPDT-3011.hinet.net 0.0% 736 19.9 22.1 16.8 531.3 33.1
5. r4102-s2.tp.hinet.net 0.0% 735 16.7 19.1 16.3 455.2 27.6
6. r4002-s2.tp.hinet.net 0.0% 735 16.9 23.7 16.5 677.1 37.9
7. r12-pa.us.hinet.net 0.0% 735 189.1 183.6 176.8 686.1 29.1
8. r11-pa.us.hinet.net 0.0% 735 159.4 164.2 158.9 609.8 27.3
r11-pa.us.hinet.net
@bingluen
bingluen / index.html
Last active May 25, 2017 13:46
SITCON CAMP
<body>
<div id="app">
<header>
<nav id="navbar">
<div class="toggle"><a href="#navbar" class="center"><span class="icon"></span><h1 class="text">Menu</h1></a></div>
<ul class="center">
<li>
<a href="#banner" data-target="#banner" class="center">
<div data-target="#banner" class="icon"></div>
</a>