Skip to content

Instantly share code, notes, and snippets.

View thefron's full-sized avatar
๐Ÿ“•

Hoseong Liam Hwang thefron

๐Ÿ“•
View GitHub Profile
@madcoda
madcoda / App.js
Created May 28, 2017 04:24
React-router v4 multi layout
import React, { Component } from 'react'
import { BrowserRouter as Router, Route, Link, Match, Redirect, Switch } from 'react-router-dom'
import OverviewPage from './page/OverviewPage'
import AccountPage from './page/AccountPage'
/*
Layouts, inline define here for demo purpose
you may want to define in another file instead
*/
@mtpereira
mtpereira / local-registry.yml
Last active May 11, 2021 04:22
Local development with Kubernetes
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
@juhaelee
juhaelee / react-typescript.md
Last active June 17, 2025 15:17
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

@schickling
schickling / _README.md
Last active January 4, 2024 09:37
Script to import and export docker-machine configurations to sync between hosts/collaborators

docker-machine import/export

Script to import and export docker-machine configurations to sync between hosts/collaborators

Export (on host A)

$ docker-machine ls
NAME       ACTIVE   DRIVER         STATE     URL                            SWARM   DOCKER    ERRORS
dev        -        digitalocean   Running   tcp://example.com:2376                 v1.10.1
@selaromi
selaromi / rails-postgres-wercker-database_url.md
Last active June 26, 2017 08:27
wercker.yml for Rails with Postgresql and DATABASE_URL (docker stack)

RAILS & POSTGRES WITH WERCKER AND DATABASE_URL

Basically, if you prefer to use DATABASE_URL in your application better than creating the whole database.yml thing, set the following ENV variable in your wercker app settings:

  • APP_POSTGRES_PASSWORD (required)
  • APP_POSTGRES_USER (optional)
  • APP_POSTGRES_DB (optional)
  • DATABASE_URL (value below)

name: DATABASE_URL

@thomasst
thomasst / migrate-redis.py
Created May 14, 2015 18:26
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.
@msoap
msoap / script.go
Last active October 8, 2022 17:23
Run Go program as script
//usr/bin/env go run $0 "$@"; exit
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println("Hello world!")
@four43
four43 / install-redis.sh
Last active January 4, 2025 19:18 — forked from dstroot/install-redis.sh
Install Redis
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@9beach
9beach / ๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€.md
Last active November 16, 2024 06:51
๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€๋ฅผ ๋‚˜์—ดํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ์ˆ  ๋ฌธ์„œ๋ฅผ ์“ธ ๋•Œ ์ฃผ์˜ํ•ด์•ผ ํ•  ๋ช‡ ๊ฐ€์ง€

๋…์ž ๋ฐฐ๋ ค

์ž์‹ ์˜ ์ƒ๊ฐ๊ณผ ํ•  ์ผ์„ ์ •๋ฆฌํ•˜๋Š” ๊ฒƒ์ด ๊ธฐ์ˆ  ๋ฌธ์„œ์˜ ๋ชฉํ‘œ๊ฐ€ ๋  ์ˆ˜๋Š” ์—†๋‹ค. ๋จผ์ € ๋…์ž๋ฅผ ์‹๋ณ„ํ•˜๋ผ. ๊ทธ๋ฆฌ๊ณ  ๋…์ž๋ฅผ ๋ฐฐ๋ คํ•˜๊ณ  ๋…์ž ์ž…์žฅ์„ ์ƒ๊ฐํ•˜๋ฉฐ ๋ฌธ์„œ๋ฅผ ์ž‘์„ฑํ•˜๋ผ.

ํ…์ŠคํŠธ ํŒŒ์ผ์˜ ์žฅ์ 

์ค‘์š”ํ•œ ์ •๋ณด๋ฅผ ์œ„ํ‚ค๋‚˜ ๊นƒ(Git)์—์„œ ํ…์ŠคํŠธ๋กœ ์ž‘์„ฑํ•˜์ง€ ์•Š๊ณ , ์›Œ๋“œ๋‚˜ ํŒŒ์›Œํฌ์ธํŠธ ๊ฐ™์€ ์ด์ง„ ๋ฌธ์„œ๋กœ ์ž‘์„ฑํ•  ๋•Œ๋งˆ๋‹ค ๋‹น์‹ ์˜ ๋™๋ฃŒ๋Š” ์ ‘๊ทผ์„ฑ, ๊ฐ€์‹œ์„ฑ, ๋ฒ„์ „ ๊ด€๋ฆฌ ๋“ฑ ๋‹ค์–‘ํ•œ ๋ฌธ์ œ๋กœ ๊ณ ์ƒํ•  ๊ฒƒ์ด๋‹ค.

@gcarrion-gfrmedia
gcarrion-gfrmedia / 0000_packages.config
Created April 29, 2014 10:49
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
# Install Git needed for Git based gems
packages:
yum:
git: []