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
| 'URL to open.... | |
| sUrl = "http://example.com" | |
| 'POST Request to send. | |
| sRequest = "post=true" | |
| sDestFolder = "C:/" | |
| sImageFile = "example" & "_" & Year(Date) & "_" & Month(Date) & "_" & Day(Date) & ".log" | |
| WScript.Echo "Done..." |
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 | |
| function closeOutput($stringToOutput){ | |
| set_time_limit(0); | |
| ignore_user_abort(true); | |
| header("Connection: close\r\n"); | |
| header("Content-Encoding: none\r\n"); | |
| ob_start(); | |
| echo $stringToOutput; | |
| $size = ob_get_length(); |
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
| String.prototype.toHHMMSS = function () { | |
| var sec_num = parseInt(this, 10); // don't forget the second param | |
| var hours = Math.floor(sec_num / 3600); | |
| var minutes = Math.floor((sec_num - (hours * 3600)) / 60); | |
| var seconds = sec_num - (hours * 3600) - (minutes * 60); | |
| if (hours < 10) {hours = "0"+hours;} | |
| if (minutes < 10) {minutes = "0"+minutes;} | |
| if (seconds < 10) {seconds = "0"+seconds;} | |
| var time = hours+':'+minutes+':'+seconds; |
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 parseDate(dateString) { | |
| var dateString, parts, date, time, dt, ms; | |
| parts = dateString.split(/[T ]/); // Split on `T` or a space to get date and time | |
| date = parts[0]; | |
| time = parts[1]; | |
| dt = new Date(); | |
| parts = date.split(/[-\/]/); // Split date on - or / |
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
| SELECT IIF(ISNULL(column),0,column) FROM table; |
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
| watch -d -n1 'netstat -natpu' |
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
| VMware workstation 10 | |
| 破解序列号: | |
| 5F29M-48312-8ZDF9-A8A5K-2AM0Z | |
| 0F63E-20HEM-4ZC49-RKC5M-A22HY | |
| 4F2A2-ARHEK-MZJJ0-JH8EH-C2GQG | |
| 1U64X-AA351-KZ519-4R85M-A2KJR | |
| HU03A-F83EM-9Z7L8-LT974-3CE7V | |
| 1A46W-AHL9H-FZ7Z8-ETC50-0CK4P | |
| 1U2WF-64K91-EZQU9-T195H-0A34K | |
| JZ2Q8-DZJ5L-VZWG8-ZH0NH-A3ZNR |
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
| # tar: (c)reate g(z)ip (v)erbose (f)ile [filename.tar.gz] [contents]... | |
| tar -czvf /var/file/bkup.tar.gz /home/code/bots /var/config /var/system | |
| # zip: (r)ecursive [filename.zip] [contents]... | |
| zip -r /var/file/bkup.zip /home/code/bots /var/config /var/system | |
| # tar: e(x)tract g(z)ip (v)erbose (f)ile [filename.tar.gz] [contents]... | |
| tar -xzvf /var/file/bkup.tar.gz /home/code/bots /var/config /var/system |
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
| mysqldump -uUSERNAME -pPASSWORD -hHOSTNAME USER_DATABASE > FILENAME.sql | |
| #Then import using: | |
| mysql -uUSERNAME -pPASSWORD -hHOSTNAME USER_DATABASE < FILENAME.sql |
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
| lyon:~ Lyon$ sudo port install php54-mcrypt | |
| ---> Computing dependencies for php54-mcrypt | |
| ---> Dependencies to be installed: php54 | |
| ---> Fetching archive for php54 | |
| Warning: Your DNS servers incorrectly claim to know the address of nonexistent hosts. This may cause checksum mismatches for some ports. | |
| ---> Attempting to fetch php54-5.4.27_0+libedit.darwin_13.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/php54 | |
| ---> Attempting to fetch php54-5.4.27_0+libedit.darwin_13.x86_64.tbz2.rmd160 from http://jog.id.packages.macports.org/macports/packages/php54 | |
| ---> Installing php54 @5.4.27_0+libedit | |
| ---> Activating php54 @5.4.27_0+libedit |