Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| /* SIDE BY SIDE PHRICTION EDIT */ | |
| /* add a userstyle with pattern */ | |
| /* L H S */ | |
| /* pos of left-hand editor */ | |
| .phui-box.phui-box-border.mlt.mll.mlr.phui-object-box.phui-object-box-lightblue { | |
| margin-right: 800px !important; | |
| margin-left:0 !important; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
| <title>*scratch*</title> | |
| <style> | |
| body { | |
| font-family: Hack, Menlo, Monaco, 'Droid Sans Mono', 'Courier New', monospace; | |
| white-space: pre; |
| <?php | |
| /* | |
| PHP Automorphic Number Finder Algorithm | |
| Author: Lawrence Lagerlof | |
| License: MIT | |
| */ | |
| $limit = 1000000; | |
| $milestone = $limit / 100; | |
| for ($n = 2; $n <= $limit; $n++) { | |
| $square = (string) $n * $n; |
| <?php | |
| // original author: https://www.php.net/manual/en/function.print-r.php#93529 | |
| // another dev said it was fixed for null values, but I don't encountered errors with null values for Matt's: https://www.php.net/manual/en/function.print-r.php#121259 | |
| // Matt | |
| function print_r_reverse($in) { | |
| $lines = explode("\n", trim($in)); | |
| if (trim($lines[0]) != 'Array') { | |
| // bottomed out to something that isn't an array | |
| return $in; |
| # Must run as root in mysql cli | |
| SET global log_output = 'FILE'; | |
| SET global general_log_file='mysql_sql.log'; | |
| SET global general_log = 1; | |
| # Disable with SET global general_log = 0; |
| function substringExists(haystack, needle) | |
| { | |
| size_haystack = haystack.length; | |
| size_needle = needle.length; | |
| loop = size_haystack - size_needle; | |
| for (i=0; i < loop + 1; i++) { | |
| sub = haystack.substr(i, size_needle); | |
| c = sub.localeCompare(needle, {}, {sensitivity: 'base'}); | |
| if (c === 0) { | |
| return true; |