Skip to content

Instantly share code, notes, and snippets.

View yoophi's full-sized avatar
💭
Hi, there

Pyunghyuk Yoo yoophi

💭
Hi, there
View GitHub Profile
@yoophi
yoophi / gitflow-breakdown.md
Last active January 8, 2020 09:31 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
git commit --allow-empty -m "Initial commit"
git checkout -b develop master

Connect to the remote repository

@yoophi
yoophi / media-query.css
Created December 14, 2018 02:24 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@yoophi
yoophi / .travis.yml
Created February 27, 2019 07:15 — forked from BretFisher/.travis.yml
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@yoophi
yoophi / paramiko_example.py
Created October 19, 2019 18:40 — forked from batok/paramiko_example.py
Paramiko example using private key
import paramiko
k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
print "connecting"
c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k )
print "connected"
commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ]
for command in commands:
print "Executing {}".format( command )
@startuml
title: HTTP Request on ECS\n
actor user
participant Client
participant Route53
box LoadBalancer #LightBlue
participant ALB
#!/usr/bin/env python
import sys
class InvalidInput(Exception):
pass
class Calculator:
def add(self, *args):
#!/usr/bin/env python
import re
import sys
class KoreanNumberConverter:
big_units = {
'조': 1000000000000,
'억': 100000000,
'만': 10000,
@yoophi
yoophi / rsync_backup.sh
Created May 4, 2020 12:36 — forked from spyesx/rsync_backup.sh
Rsync backup excluding node_modules
# Backup files
#https://explainshell.com/explain?cmd=rsync+-azuv+--delete+--progress+--exclude+%27node_modules%27
rsync -auvhp --delete --exclude=node_modules [source] [destination]
# Remove all node_modules folders
# https://explainshell.com/explain?cmd=find+.+-name+%22node_modules%22+-type+d+-prune+-exec+rm+-rf+%27%7B%7D%27+%2B
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@yoophi
yoophi / jwtRS256.sh
Created May 6, 2020 14:43 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@yoophi
yoophi / basic-with-context.py
Created November 26, 2020 04:52
logbook quickstart
import sys
from logbook import Logger, StreamHandler
stream_handler = StreamHandler(sys.stdout)
def main():
log = Logger("My Awesome Logger")
log.warn("This is too cool for stdlib")