Skip to content

Instantly share code, notes, and snippets.

View calebklc's full-sized avatar
🤯
I may be slow to respond.

KwanLam Chan calebklc

🤯
I may be slow to respond.
  • Hong Kong
  • 09:23 (UTC +08:00)
View GitHub Profile
```language
Object.flatten = function(obj){
var result = {};
function recurse(src, prop) {
var toString = Object.prototype.toString;
if (toString.call(src) == '[object Object]') {
var isEmpty = true;
for (var p in src) {
isEmpty = false;
@calebklc
calebklc / README.md
Created March 19, 2020 15:23 — forked from nicejade/README.md
Generate a good README

Generate a good README

Generate a good README use `npx` commmd.

@calebklc
calebklc / AntdInput.js
Last active February 24, 2020 16:27
Question about dynamic fields in ArrayField
import React from 'react';
import { asField } from 'informed';
import { Form, Input } from 'antd';
const AntdInput = asField(({ fieldState, fieldApi, ...props }) => {
const { value } = fieldState;
const { setValue, setTouched } = fieldApi;
const {
onChange,
onBlur,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>data</title>
</head>
<body>
<iframe
@calebklc
calebklc / README-Template.md
Created April 15, 2019 06:04 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@calebklc
calebklc / how-to-use-mermaid-in-totaljs-wiki-v2.md
Last active March 8, 2019 03:02
How to use mermaid in Total.js Wiki v2?
@calebklc
calebklc / install-tomcat-8.5.14.sh
Created July 20, 2017 12:08 — forked from Clivern/install-tomcat-8.5.14.sh
How to Install Apache Tomcat 8 on Ubuntu 16.04
#!/bin/bash
# For More Info http://clivern.com/how-to-install-apache-tomcat-8-on-ubuntu-16-04
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install unzip
cd /opt
curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.15/bin/apache-tomcat-8.5.15.zip
sudo unzip apache-tomcat-8.5.15.zip
sudo mv apache-tomcat-8.5.15 tomcat
@calebklc
calebklc / My Manjaro Linux (GNOME) Web Development Environment Setup.md
Last active September 23, 2023 03:02
My Manjaro Linux (GNOME) Web Development Environment Setup
@calebklc
calebklc / ubuntu-server-setup-16.04.md
Created March 24, 2017 10:13 — forked from marcuslilja/ubuntu-server-setup-16.04.md
Server setup for Ubuntu 16.04 on Digital Ocean

Server setup for Ubuntu 16.04 on Digital Ocean

The setup installs the following software:

  • Nginx
  • MySQL
  • PHP
  • Node
  • Composer