Skip to content

Instantly share code, notes, and snippets.

View dspaudio's full-sized avatar

Wonkyoo Nam dspaudio

View GitHub Profile
@dspaudio
dspaudio / Preferences.sublime-settings
Last active December 13, 2015 21:18
My Sublime Text 2 Preferences
{
"auto_complete_commit_on_tab": true,
"auto_complete_with_fields": true,
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
@dspaudio
dspaudio / Default (OSX).sublime-keymap
Last active December 13, 2015 21:19
My Sublime Text 2 Key Maps
[
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false, "sub_words": true } },
{ "keys": ["ctrl+alt+backspace"], "command": "delete_word", "args": { "forward": true, "sub_words": true } },
{ "keys": ["super+ctrl+r"], "command": "reindent", "args": {"single_line": false} },
{ "keys": ["super+ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["super+ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["super+'"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["super+j"], "command": "join_lines" },
{
"auto_upgrade_last_run": null,
"installed_packages":
[
"AdvancedNewFile",
"ApacheConf.tmLanguage",
"ApplySyntax",
"Bower",
"BracketHighlighter",
"Codecs33",
//read EXIF header from uploaded file
$exif = exif_read_data($_FILES['ImageFile']['tmp_name']);
//fix the Orientation if EXIF data exist
if(!empty($exif['Orientation'])) {
switch($exif['Orientation']) {
case 8:
$createdImage = imagerotate($image,90,0);
break;
case 3: