Skip to content

Instantly share code, notes, and snippets.

View leewc's full-sized avatar

Wen Chuan Lee leewc

View GitHub Profile
@leewc
leewc / tictactoe-hooks.js
Last active August 3, 2022 09:23
React Learning : Convert Tutorial into one with Hooks
function Square(props) {
return (
<button className="square" onClick={props.onClick}>
{props.value}
</button>
)
}
function Board(props) {
function renderSquare(i) {
@leewc
leewc / tictactoe.js
Created July 31, 2022 23:47
React Learning : Tutorial
//Code from https://reactjs.org/tutorial/tutorial.html
// class Square extends React.Component {
// render() {
// return (
// <button className="square" onClick={ () => {this.props.onClick()} }>
// { this.props.value }
// </button>
// );
// }
@leewc
leewc / sssh
Last active January 3, 2023 13:48 — forked from yuki777/sssh
AWS ECS Login Script / Interactive Shell on Fargate ECS Containers
#!/bin/bash
# Bash script to run ecs-exec on Amazon ECS Fargate containers.
#
# Usage: See --help.
#
# Installation: Download the script and `chmod u+x the script`.
# - For example, in two-lines:
# curl "https://gist.githubusercontent.com/leewc/e4c3a16551b06c2b0b4640fa5a3d9c00/raw/sssh" -o "sssh" && chmod u+x ./sssh
# ./sssh
@leewc
leewc / dynamoTodynamo.hive
Created July 9, 2017 22:18
Scripts used to copy data from monthly DynamoDB tables into one table, performs simple transformation of Joda DateTime string to Unix Epoch. See https://leewc.com/articles/how-to-export-between-dynamodb-amazon-emr/
-----------------------------------------------------------------------------------------------------------
-- Script to migrate data from monthly tables into one table.
-- filename: dynamotodynamo.hive
-- author: leewc
-- Instructions:
-- Run: hive -hiveconf domain="Devo" -hiveconf region="NA" -hiveconf yyyymm=201604 -f dynamoTodynamo.hive
-- Variables passed from bash are accessible via hiveconf.
-- Variables are case-sensitive i.e test != Test
------------------------------------------------------------------------------------------------------------
@leewc
leewc / keybase.md
Last active September 1, 2016 04:19
Keybase.io Proof that I am who I say I am.

Keybase proof

I hereby claim:

  • I am leewc on github.
  • I am leewc (https://keybase.io/leewc) on keybase.
  • I have a public key ASCLUGhsV8ZX3ArMELl1lBNw9TqSykIpuWujqS9qxYix7go

To claim this, I am signing this object: