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
| util.htmlspecialchars = function (str) { | |
| return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """); | |
| }; | |
| util.htmlspecialchars_decode = function (str) { | |
| return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\""); | |
| }; | |
| util.nl2br = function (str) { | |
| return str.replace(/\n/g, "<br>"); | |
| }; |
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
| filetype on | |
| if &diff | |
| filetype plugin off | |
| else | |
| filetype plugin on | |
| endif | |
| set bs=2 | |
| set cindent | |
| set history=50 |
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+w"], | |
| "command": "run_multiple", | |
| "args": { | |
| "commands": [ | |
| {"command": "find_under_expand", "args": null, "context": "window"}, | |
| {"command": "show_panel", "args": {"panel": "find"}, "context": "window"} | |
| ] | |
| } |
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
| # General configuration. | |
| # $ tmux show-options -g | |
| set -g base-index 1 | |
| set -g display-time 5000 | |
| set -g repeat-time 1000 | |
| set -g status-keys vi | |
| set -g status-utf8 on | |
| set -g status-bg black | |
| set -g status-fg white | |
| set -g status-justify left |
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
| # | |
| # This is the main Apache HTTP server configuration file. It contains the | |
| # configuration directives that give the server its instructions. | |
| # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. | |
| # In particular, see | |
| # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> | |
| # for a discussion of each configuration directive. | |
| # | |
| # Do NOT simply read the instructions in here without understanding | |
| # what they do. They're here only as hints or reminders. If you are unsure |
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
| /*global $, jQuery, alert, console, angular*/ | |
| /** | |
| * | |
| * @authors Ted Shiu (tedshd@gmail.com) | |
| * @date 2015-01-09 01:23:09 | |
| * @version $Id$ | |
| */ | |
| /** | |
| * [Ajax basic] |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| var polling, | |
| pollingResponse = true; | |
| polling = setInterval( | |
| function () { | |
| if (pollingResponse) { | |
| console.log('polling'); | |
| pollingResponse = false; | |
| $.ajax({ | |
| url: 'test.php', | |
| type: 'POST', |
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 trimHTMLTagContent(string) { | |
| string = string.replace(/\n/g, ''); | |
| string = string.replace(/\s\s/g, ''); | |
| // remove two space | |
| string = string.replace(/<font color.*?<\/font>/mig, ''); | |
| // remove color font content | |
| string = string.replace(/<[^>]*>/g, ''); | |
| // remove html tag | |
| console.log(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
| img#hplogo { | |
| box-sizing: border-box; | |
| background: url("http://i.imgur.com/r9kSl5P.png") center no-repeat !important; /*same background as the 2nd one */ | |
| width: 321px; /* width of your image */ | |
| height: 298px; /* height of your image */ | |
| padding-left: 321px; /* equal to the width of the image */ | |
| margin: 7px auto; | |
| } | |
| #hplogo {text-indent: -9000px !important;white-space: nowrap;} | |
| div#hplogo { |