- Unity Hierarchy 는 건드리지 않는다고 가정하자.
- 민재가 구현한 코드를 최대한 리팩토링 해보도록 한다.
- 새로운 기능은 따로 표시해 놓음
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remove trailing newline, . */ | |
if ((strlen(name)>0) && (name[strlen (name) - 1] == '\n')) | |
name[strlen (name) - 1] = '\0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: 6eafe619-9856-1e4c-857f-3c7b8157e144" -d '{ | |
"title": "New logo", | |
"body": "We should have one", | |
"labels": ["design"] | |
}' "https://api.github.com/repos/maxtortime/python-lotto/issues?access_token=" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var num; | |
sorted(random.sample([ | |
(function() { | |
var i, len, ref, results; | |
ref = range(1, 46); | |
results = []; | |
for (i = 0, len = ref.length; i < len; i++) { | |
num = ref[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!env sh | |
base64 /dev/urandom | head -c 10000000 > 10MB.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [1]: %load_ext autoreload | |
In [2]: %autoreload 2 | |
In [3]: from foo import some_function | |
In [4]: some_function() | |
Out[4]: 42 | |
In [5]: # open foo.py in an editor and change some_function to return 43 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def chunks(l, n): | |
"""Yield successive n-sized chunks from l.""" | |
for i in range(0, len(l), n): | |
yield l[i:i + n] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define models | |
roles_users = db.Table('roles_users', | |
db.Column('user_id', db.Integer(), db.ForeignKey('user.id')), | |
db.Column('role_id', db.Integer(), db.ForeignKey('role.id'))) | |
# Role table | |
class Role(db.Model, RoleMixin): | |
id = db.Column(db.Integer(), primary_key=True) | |
name = db.Column(db.String(80), unique=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git status -uno # Untracked file 들은 무시 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/tkim/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="agnoster-newline" |
OlderNewer