⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Initialize cURL | |
$ch = curl_init(); | |
// The URL to load | |
curl_setopt($ch, CURLOPT_URL, 'http://www.url-to-load.com'); | |
// Uncomment the following two lines to send POST data | |
// curl_setopt($ch,CURLOPT_POST, count($post_data_array)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="" method="post" accept-charset="utf-8" enctype="multipart/form-data"> | |
<input type="file" name="file"> | |
<input type="submit" name="btn_submit" value="Upload File" /> | |
<?php | |
$fh = fopen($_FILES['file']['tmp_name'], 'r+'); | |
$lines = array(); | |
while( ($row = fgetcsv($fh, 8192)) !== FALSE ) { | |
$lines[] = $row; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------------------- | |
// Replace multiple spaces with a single space | |
// Substitute "\s\s" with whatever characters you want to check for | |
//-------------------------------------------------------------------------- | |
$text = preg_replace("/\s\s+/", ' ', $text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Package Manager | |
http://wbond.net/sublime_packages/package_control | |
SodaTheme | |
https://github.com/buymeasoda/soda-theme | |
CodeIgniter Snippets | |
https://github.com/mpmont/ci-snippets | |
jQeury Snippets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["f1"], "command": "goto_documentation" } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["ctrl+q"], "command": "exit" }, | |
{ "keys": ["ctrl+shift+n"], "command": "new_window" }, | |
{ "keys": ["ctrl+shift+w"], "command": "close_window" }, | |
{ "keys": ["ctrl+o"], "command": "prompt_open_file" }, | |
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" }, | |
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} }, | |
{ "keys": ["ctrl+n"], "command": "new_file" }, | |
{ "keys": ["ctrl+s"], "command": "save" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"font_size": 10.0, | |
"ignored_packages": | |
[ | |
"Vintage", | |
"Color Highlighter" | |
], | |
"ignored_words": | |
[ | |
"Affiliate's", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// While you can edit this file, it's best to put your changes in | |
// "User/Preferences.sublime-settings", which overrides the settings in here. | |
// | |
// Settings may also be placed in file type specific options files, for | |
// example, in Packages/Python/Python.sublime-settings for python files. | |
{ | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
// Note that the font_face and font_size are overriden in the platform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_ip() { | |
if( isset($_SERVER['HTTP_CLIENT_IP']) ) { | |
$ip = $_SERVER['HTTP_CLIENT_IP']; | |
} elseif( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ) { | |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} else { | |
$ip = @$_SERVER['REMOTE_ADDR']; | |
} | |
return $ip; | |
} |
OlderNewer