Skip to content

Instantly share code, notes, and snippets.

View wonderer80's full-sized avatar
😆
건강한 개발자가 되기 위해 노력 중!

Jeonghun Kim(Lyle) wonderer80

😆
건강한 개발자가 되기 위해 노력 중!
View GitHub Profile

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@wonderer80
wonderer80 / output_query.py
Last active February 9, 2022 02:42
Django shell 에서 queryset 실행 될 때 SQL을 콘솔 출력하기
from django.test.utils import CaptureQueriesContext
from django.db import connections
from contextlib import ExitStack
import logging
logger = logging.getLogger('django.db.backends')
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())
for connection in connections.all():
@wonderer80
wonderer80 / auto_correct.sh
Created March 26, 2019 07:28
staging 된 파일들을 rubocop 자동 교정
#!/bin/sh
#
FILES="$(git diff --cached --name-only --diff-filter=AMC | grep "\.rb$" | tr '\n' ' ')"
bundle exec rubocop -a ${FILES}
@wonderer80
wonderer80 / pre-commit
Last active July 31, 2020 09:05
commit 전에 rubocop 검사하기
#!/bin/sh
#
# Check for ruby style errors
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
NC='\033[0m'
if git rev-parse --verify HEAD >/dev/null 2>&1
@wonderer80
wonderer80 / prune_branch.sh
Created February 7, 2019 05:36
리모트에 없는 로컬 브랜치 정리하기
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
@wonderer80
wonderer80 / connect_servers.rb
Last active March 26, 2019 07:29
iterm에서 IP 리스트들에 ssh 접속하기
ip_list = ARGF.read.gsub('"', '').split("\n")
# 최대 10개 까지만 가능
number_string = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth']
row_number = (ip_list.size / 2.to_f).ceil
add_x = row_number - 2
add_x = 0 if add_x < 0