Skip to content

Instantly share code, notes, and snippets.

View maxtortime's full-sized avatar

Kim Taehwan maxtortime

View GitHub Profile
@maxtortime
maxtortime / remove_traling_newline.c
Created February 28, 2016 09:00
Remove trailing new line after fgets
/* Remove trailing newline, . */
if ((strlen(name)>0) && (name[strlen (name) - 1] == '\n'))
name[strlen (name) - 1] = '\0';
@maxtortime
maxtortime / create_issue.sh
Last active June 9, 2016 14:17
creating new issue by postman
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="
(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];
#!env sh
base64 /dev/urandom | head -c 10000000 > 10MB.txt
@maxtortime
maxtortime / ipython
Created August 3, 2016 07:00
ipython authoreload
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
def chunks(l, n):
"""Yield successive n-sized chunks from l."""
for i in range(0, len(l), n):
yield l[i:i + n]
@maxtortime
maxtortime / models.py
Created August 8, 2016 23:33
flask-sqlalchemy 외래키 구현
# 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)
@maxtortime
maxtortime / iter_delete_repo.py
Created August 23, 2016 07:40
Delete repository by github3.py api.
import github3
gh = github3.login(token='your access token')
for repo in gh.iter_user_repos(login='maxtortime'):
choice = str(input(repo.name + ' '))
if choice == 'd':
repo.delete()
else:
@maxtortime
maxtortime / git-command
Created August 26, 2016 05:19
유용한 git 설정
git status -uno # Untracked file 들은 무시

The Moment 메인 메뉴 계획

  • Unity Hierarchy 는 건드리지 않는다고 가정하자.
  • 민재가 구현한 코드를 최대한 리팩토링 해보도록 한다.
  • 새로운 기능은 따로 표시해 놓음

UI 동작 관련

MainFrame 동작