Skip to content

Instantly share code, notes, and snippets.

Avatar

Minha Seong fra3il

View GitHub Profile
@fra3il
fra3il / 27_0.m
Last active Aug 29, 2015
[WP] DLog
View 27_0.m
#ifdef DEBUG
#define DLog(fmt, ...) NSLog((@"%s[Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define DLog(...)
#endif
@fra3il
fra3il / 1293067440.m
Created Mar 10, 2015
[Blog] 사용자 폰트 추가
View 1293067440.m
[_lbl setFont:[UIFont fontWithName:@"JPhonetic" size:20]];
@fra3il
fra3il / 1290660300_2.m
Created Mar 10, 2015
[Blog] NSStringFromClass, NSClassFromString #2
View 1290660300_2.m
Class cls = NSClassFromString(@"UILocalNotification");
@fra3il
fra3il / 1290660300_1.m
Last active Aug 29, 2015
[Blog] NSStringFromClass, NSClassFromString #1
View 1290660300_1.m
NSLog(@"%@", NSStringFromClass([viewController class]));
@fra3il
fra3il / 1288331340.py
Created Mar 9, 2015
[Blog] INSERT INTO ? VALUE ?
View 1288331340.py
#!/usr/bin/env python
#coding=utf8
import MySQLdb
conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='test')
cu = conn.cursor()
text = "문자열"
print(text)
@fra3il
fra3il / 1288336860.py
Created Mar 9, 2015
[Blog] latin1? utf8? - 2
View 1288336860.py
import MySQLdb
conn = MySQLdb.connect(host='localhost', user='root', passwd='', db='test')
cu = conn.cursor()
cu.execute("set names utf8")
@fra3il
fra3il / 1288320120_3
Created Mar 9, 2015
[Blog] latin1? utf8? - 1 #3
View 1288320120_3
+—————————————————————————–+———————————————————————————————————————————————————————
| Variable_name | Value
+—————————————————————————–+———————————————————————————————————————————————————————
| character_set_client | utf8
| character_set_connection | utf8
| character_set_database | utf8
| character_set_filesystem | binary
| character_set_results | utf8
| character_set_server | utf8
| character_set_system | utf8
@fra3il
fra3il / 1288320120_2
Created Mar 9, 2015
[Blog] latin1? utf8? - 1 #2
View 1288320120_2
[mysql]
default-character-set = utf8
[mysqld]
character-set-client-handshake = FALSE
init_connect = "SET collation_connection = utf8_general_ci"
init_connect = "SET NAMES utf8"
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci
@fra3il
fra3il / 1288320120_1
Created Mar 9, 2015
[Blog] latin1? utf8? - 1 #1
View 1288320120_1
+—————————————————————————–+———————————————————————————————————————————————————————
| Variable_name | Value
+—————————————————————————–+———————————————————————————————————————————————————————
| character_set_client | latin1
| character_set_connection | latin1
| character_set_database | latin1
| character_set_filesystem | binary
| character_set_results | latin1
| character_set_server | latin1
| character_set_system | utf8
@fra3il
fra3il / 1288250160.conf
Last active Aug 29, 2015
[Blog] httpd.conf
View 1288250160.conf
<VirtualHost *:80>
ServerName IP_ADDRESS
DocumentRoot /Users/USER_NAME/Documents/workspace/PROJECT/src/PROJECT
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE PROJECT.settings
PythonDebug On
PythonPath "['/usr/lib/python2.6','/Users/USER_NAME/Documents/workspace/PROJECT/src'] + sys.path"
PythonInterpreter PROJECT
You can’t perform that action at this time.