Skip to content

Instantly share code, notes, and snippets.

@githubutilities
githubutilities / SAE-Storage.md
Last active November 13, 2015 10:24
SAE Storage Using Django

SAE Storage Using Django

rewrite files/storage.py.

#coding=utf8

from django.core.files.storage import Storage
from django.core.files.base import ContentFile
from django.conf import settings
@githubutilities
githubutilities / SAE-MySQL.md
Last active November 13, 2015 06:02
SAE MySQL

SAE MySQL

SAE sql import

Current SAE MySQL uses MySQL version 5.5, so sql script exported by MySQL version 5.6 may not works when imported into SAE MySQL service. My solutions is following:

# unlink current version of mysql
brew unlink mysql
@githubutilities
githubutilities / my-svn-cheatsheet.md
Created November 13, 2015 05:48
my svn cheatsheet

My SVN Cheatsheet

ignore files or directore like .gitignore

svn propedit svn:ignore .
# add files and dirs you want to ignore
@githubutilities
githubutilities / CLI-Tricks.md
Created November 10, 2015 10:40
CLI Tricks
@githubutilities
githubutilities / windows-bootable-disk.md
Created November 10, 2015 03:11
Make Windows Bootable Disk In Mac
@githubutilities
githubutilities / Changing GIF Delay.md
Last active November 10, 2015 03:01
Changing GIF delay
@githubutilities
githubutilities / Security.md
Last active December 26, 2016 16:49
Security

Security

SQL Injection

Use SQL real excape to prevent it, e.g. use mysql_real_escape_string in php to excape special characters to prevent SQL injection. Django also provides this security option by default.

Access Token

@githubutilities
githubutilities / new_gist_file_0
Last active November 8, 2015 10:18
HTTP Protocol
# HTTP Protocol
* [http protocol detail](https://www.httpwatch.com/httpgallery/)
# Submitting cookies using `curl`
```sh
curl -v --cookie "sessionid=sxs44kgzd6z7dcf769yehz171yyuf8ve" -I http://localhost:8000/auth/logout/
```
@githubutilities
githubutilities / middleware.md
Last active November 26, 2015 05:22
Django Middleware