Skip to content

Instantly share code, notes, and snippets.

Minha Seong fra3il

Block or report user

Report or block fra3il

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fra3il
fra3il / 1288240380
Last active Aug 29, 2015
[Blog] apachectl
View 1288240380
sudo apachectl restart
apachectl -t
@fra3il
fra3il / 7.bash
Last active Aug 29, 2015
[WP] Can't connect to local MySQL server through socket
View 7.bash
[mysqld]
socket=/tmp/mysql.sock
[client]
socket=/tmp/mysql.sock
@fra3il
fra3il / 1288239120.py
Last active Aug 29, 2015
[Blog] Can't find the file 'settings.py' in the directory containing
View 1288239120.py
except ImportError, e:
import sys
sys.stderr.write("'settings.py': %r n" % str(e))
sys.exit(1)
@fra3il
fra3il / 1288240920_1.sh
Last active Aug 29, 2015
[Blog] Django + MySQL + Mod Python #1
View 1288240920_1.sh
$ tar xfz MySQL-python-1.2.1.tar.gz
$ cd MySQL-python-1.2.1
$ # edit site.cfg if necessary
$ python setup.py build
$ sudo python setup.py install # or su first
@fra3il
fra3il / 1288240920_2
Last active Aug 29, 2015
[Blog] Django + MySQL + Mod Python #2
View 1288240920_2
./configure –with-apxs=/usr/sbin/apxs –with-python=/usr/bin/python
make
make install
@fra3il
fra3il / 1288240920_3.c
Last active Aug 29, 2015
[Blog] Django + MySQL + Mod Python #3
View 1288240920_3.c
while ((bytes_read < len || len == 0) && !(b == APR_BRIGADE_SENTINEL(bb) || APR_BUCKET_IS_EOS(b) || APR_BUCKET_IS_FLUSH(b))) {
...
}
@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
@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 / 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_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
You can’t perform that action at this time.