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 array_to_object($array) { | |
| $return = new stdClass(); | |
| foreach ($array as $k => $v) { | |
| if (is_array($v)) { | |
| $return->$k = $this->array_to_object($v); | |
| } | |
| else { | |
| $return->$k = $v; |
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
| # docs location | |
| http://www.sublimetext.com/docs/2/api_reference.html | |
| # log all input | |
| sublime.log_input(True) | |
| # log all commands | |
| sublime.log_commands(True) |
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
| Ctrl+Alt - Transfers mouse and keyboard input from the virtual machine to the local machine. Switches from full screen mode to running the VMware Remote Console in a separate window | |
| Ctrl+G - Transfers mouse and keyboard input from the local machine to the virtual machine | |
| Ctrl+Alt+Insert - Sends a Ctrl+Alt+Del signal to the virtual machine | |
| Ctrl+Alt+Enter - Switches between full screen mode and running VMware Remote Console in a separate window | |
| F11 - switches to full-screen mode and back to normal mode |
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 ($str) { | |
| $working = json_encode($str); | |
| $working = preg_replace('/\\\u([0-9a-z]{4})/', '&#x$1;', $working); | |
| return json_decode($working); | |
| }; |
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
| #find all directories with a certain name and delete them | |
| find ./ -type d -name "CVS" -exec rm -rf {} \; |
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": ["shift+tab"], "command": "unindent" }, | |
| { "keys": ["ctrl+shift+m"], "command": "toggle_minimap" }, | |
| { "keys": ["ctrl+j"], "command": "move", "args": {"by": "characters", "forward": false} }, | |
| { "keys": ["ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true} }, | |
| { "keys": ["ctrl+i"], "command": "move", "args": {"by": "lines", "forward": false} }, | |
| { "keys": ["ctrl+k"], "command": "move", "args": {"by": "lines", "forward": true} }, | |
| { "keys": ["ctrl+shift+n"], "command": "new_window" }, | |
| { "keys": ["ctrl+shift+w"], "command": "close_window" }, | |
| { "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }, |
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": ["shift+tab"], "command": "unindent" }, | |
| { "keys": ["ctrl+shift+m"], "command": "toggle_minimap" }, | |
| { "keys": ["ctrl+j"], "command": "move", "args": {"by": "characters", "forward": false} }, | |
| { "keys": ["ctrl+l"], "command": "move", "args": {"by": "characters", "forward": true} }, | |
| { "keys": ["ctrl+i"], "command": "move", "args": {"by": "lines", "forward": false} }, | |
| { "keys": ["ctrl+k"], "command": "move", "args": {"by": "lines", "forward": true} }, | |
| { "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }, | |
| { "keys": ["ctrl+alt+d"], "command": "expand_selection", "args": {"to": "word"} }, | |
| { "keys": ["ctrl+alt+d"], "command": "find_under_expand", "context": |
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
| update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, 'find this string', 'replace found string with this string'); |
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
| preg_match('/[^\/]+$/', $this->_image_url, $matches); |
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
| ssh -OPTIONS -p SSH_PORT user@remote_server "remote_command1; remote_command2; remote_script.sh" |
OlderNewer