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
| <script> | |
| (function () { | |
| // Avoid double-injection | |
| if (window.__confettiRunning) return; | |
| window.__confettiRunning = true; | |
| // Create canvas | |
| var cv = document.createElement('canvas'); | |
| var ctx = cv.getContext('2d'); | |
| cv.style.position = 'fixed'; |
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
| $deck = [ | |
| 'SPA'=>['suite'=>'spade','value'=>'ace', 'char'=>'U+1F0A1'], | |
| 'SP2'=>['suite'=>'spade','value'=>'2', 'char'=>'U+1F0A2'], | |
| 'SP3'=>['suite'=>'spade','value'=>'3', 'char'=>'U+1F0A3'], | |
| 'SP4'=>['suite'=>'spade','value'=>'4', 'char'=>'U+1F0A4'], | |
| 'SP5'=>['suite'=>'spade','value'=>'5', 'char'=>'U+1F0A5'], | |
| 'SP6'=>['suite'=>'spade','value'=>'6', 'char'=>'U+1F0A6'], | |
| 'SP7'=>['suite'=>'spade','value'=>'7', 'char'=>'U+1F0A7'], | |
| 'SP8'=>['suite'=>'spade','value'=>'8', 'char'=>'U+1F0A8'], |
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
| #!/bin/bash | |
| echo Tweaking the linux kernel... | |
| echo disable pmtu discovery | |
| echo /proc/sys/net/ipv4/ip_no_pmtu_disc: | |
| cat /proc/sys/net/ipv4/ip_no_pmtu_disc | |
| echo recommended value is 1 | |
| echo enable workaround when broken window scaling is detected. |
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
| #!/bin/bash | |
| # | |
| # Solution based on https://stackoverflow.com/a/11988455/119829 | |
| # Thank you balanv. | |
| # | |
| base_domain=test.example.com; | |
| command -v telnet >/dev/null 2>&1 || { echo >&2 "I require telnet but it's not installed. Aborting."; exit 1; } |
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 | |
| $file = __DIR__ . DIRECTORY_SEPARATOR . 'post2log.txt'; | |
| $post = $_POST; | |
| if(!empty($post)){ | |
| $post['timestamp'] = date('r'); | |
| file_put_contents($file,print_r($post,true),FILE_APPEND); | |
| http_response_code(202); | |
| print_r($post); | |
| }else{ | |
| http_response_code(405); |
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
| -- These are mostly MySQL Specific commands. | |
| -- probe your query log settings. This will show you if its on or not and where its going (db or file) | |
| SHOW VARIABLES LIKE 'general%' | |
| ; | |
| -- saves the query log to a table in mysql. This is usually easier to get to. | |
| SET GLOBAL log_output = '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
| <?php | |
| /** | |
| * Class RD_Text_Extraction | |
| * | |
| * Example usage: | |
| * | |
| * $response = RD_Text_Extraction::convert_to_text($path_to_valid_file); | |
| * | |
| * For PDF text extraction, this class requires the Smalot\PdfParser\Parser class. |
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
| /* | |
| * http://www.myersdaily.org/joseph/javascript/md5-text.html | |
| */ | |
| (function (global) { | |
| var md5cycle = function (x, k) { | |
| var a = x[0], | |
| b = x[1], | |
| c = x[2], | |
| d = x[3]; |
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 | |
| /* | |
| * Bootstrap this outside of normal wordpress plugin | |
| * won't load theme support functionality | |
| */ | |
| define( 'WP_USE_THEMES', false ); | |
| require( './wp-load.php' ); | |
| /* | |
| * Need to know the ID for your user. | |
| * #1 is usually an admin. Don't put this on a live site. |
NewerOlder