Skip to content

Instantly share code, notes, and snippets.

emphasis { font-style: italic; }
strong { font-weight: bold; }
header { color: rgba(0, 0, 128, 1); }
comment { color: rgba(96, 139, 78, 1); }
constant.language { color: rgba(86, 156, 214, 1); }
constant.numeric { color: rgba(181, 206, 168, 1); }
constant.regexp { color: rgba(100, 102, 149, 1); }
constant.rgb-value { color: rgba(212, 212, 212, 1); }
entity.name.tag { color: rgba(86, 156, 214, 1); }
entity.name.function { color: rgba(212, 212, 212, 1); }
@joshearl
joshearl / PHP.sublime-settings
Created July 13, 2013 19:44
To enable double-clicking to select PHP variables (including the `$` prefix), save this file as `Data/Packages/User/PHP.sublime-settings`.
{
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}
@ebidel
ebidel / handle_file_upload.php
Created April 18, 2012 03:23
Uploading files using xhr.send(FormData) to PHP server
<?php
$fileName = $_FILES['afile']['name'];
$fileType = $_FILES['afile']['type'];
$fileContent = file_get_contents($_FILES['afile']['tmp_name']);
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent);
$json = json_encode(array(
'name' => $fileName,
'type' => $fileType,
'dataUrl' => $dataUrl,
@robcowie
robcowie / Preferences.sublime-settings
Created March 16, 2012 12:36
Example Sublimetext 2 TODO plugin config
{
"color_scheme": "Packages/User/textmate-solarized/Solarized (Dark).tmTheme",
"default_line_ending": "unix",
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_white_space": "selection",
"find_selected_text": true,
"font_face": "menlo",
"font_size": 12,
"highlight_line": true,