Skip to content

Instantly share code, notes, and snippets.

@jasperck
jasperck / GCPNext2017_taipei_google.md
Last active March 9, 2017 05:32
GCPNext 17 Taipei note

自動化日誌處理架構

主要講這家公司怎麼串接一堆 google cloud service 來打造一個 logger 加值應用服務,前因後果:
該公司一部份本業在開發 hybrid app,他們有一套 app 更新日誌的機制放在 google cloud,所以串了一個

bucket -> (定時生)access log -> (pub/sub) -> app engine -> data flow -> big query / visualization / etc 的流程,

主要強調這不僅讓他的 RD 練功,業務有武器去打仗,也讓客戶相信他們是熟悉 GCP 的公司,
雖然 ... speaker demo 的 POC 和架構在後面第三場 session 被 Google speaker 吐槽到不行...

PWA and chat bot

@jasperck
jasperck / converter.js
Last active April 29, 2022 14:13
Implement hex2bin and bin2hex in JavaScript
/**
* Implement hex2bin and bin2hex in JavaScript
* https://gist.github.com/jasperck
*
* Copyright 2017, JasperChang <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
const hex2bin = str => str.match(/.{1,2}/g).reduce((str, hex) => str += String.fromCharCode(parseInt(hex, 16)), '');
@jasperck
jasperck / client.js
Last active December 14, 2016 06:59
Socket.IO server/client test
class Client {
/**
* constructor
* @param host
* @param port
*/
constructor (host, port) {
this.io = null;
this.socket = null;
this.config = { host, port }
@jasperck
jasperck / AWSomeday-note.md
Last active November 22, 2016 15:39
20161112 AWSomeday hosted by Amazon

Cloud computing is on-demand delivery of IT resources and applications via the Internet with pay-as-you-go pricing

Foundational services

meta-data vs user-data vpc vs subnet

regions vs Availability Zones (AZ)

s3 vs ebs vs instance storage

  • s3
@jasperck
jasperck / XHRMITM.js
Last active November 12, 2016 08:25
To intercept and modify the response, browser could render with your mutation
(function () {
const XHR = window.XMLHttpRequest;
function newXHR () {
var xhr = new XHR();
xhr.addEventListener("readystatechange", () => {
if (xhr.readyState === 4) {
var originalResponse = JSON.parse(xhr.responseText); // store first
Object.defineProperty(xhr, "responseText", { writable: true }); // make it writable, careful it will also clear it
@jasperck
jasperck / Radar-css-example.markdown
Created August 20, 2014 09:28
A Pen by Jasper Chang.