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 | |
| /** | |
| * A little php script to accept images and make folders based on the hash, | |
| * with a bonus _ folder at the end to detect if collisions occur. | |
| * | |
| * For example, using a form on this page would convert the following image | |
| * https://dev.nektro.net/assets/nektro.png | |
| * http://localhost/imgh/cdn/89/9e/84/39/49/12/16/7a/06/c7/b1/ae/c5/18/e5/3b/d7/8e/b6/a5/eb/7d/29/9e/cf/fa/ec/63/51/d8/19/1b/_0/c.png | |
| */ | |
| $home_dir = '/imgh/'; |
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 | |
| /** | |
| * Connect to an HTTP server and echo the response | |
| */ | |
| $host = 'localhost'; | |
| $port = 80; | |
| $fp = fsockopen($host, $port, $errno, $errstr, 30); | |
| if (!$fp) { | |
| echo "$errstr ($errno)<br />\n"; | |
| } |
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
| .head { | |
| height: 32px; | |
| font-size: 16px; | |
| line-height: 32px | |
| } | |
| .head ul { | |
| margin: 0 | |
| } | |
| .head ul li { | |
| list-style-type: none; |
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 convBase($numberInput, $fromBaseInput, $toBaseInput) | |
| { | |
| if ($fromBaseInput==$toBaseInput) return $numberInput; | |
| $fromBase = str_split($fromBaseInput,1); | |
| $toBase = str_split($toBaseInput,1); | |
| $number = str_split($numberInput,1); | |
| $fromLen=strlen($fromBaseInput); | |
| $toLen=strlen($toBaseInput); | |
| $numberLen=strlen($numberInput); |
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
| import java.awt.Color; | |
| import java.awt.image.BufferedImage; | |
| import java.io.File; | |
| import java.io.FileWriter; | |
| import java.io.IOException; | |
| import javax.imageio.ImageIO; | |
| public class Lifeinator | |
| { | |
| public static void main(String[] args) |
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> | |
| const importDoc = document.currentScript.ownerDocument; | |
| </script> |
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
| import javax.swing.JOptionPane; | |
| import javax.swing.UIManager; | |
| import javax.swing.UnsupportedLookAndFeelException; | |
| public class CoolioVirus | |
| { | |
| public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException | |
| { | |
| String title = "Virus Alert !"; | |
| String message = "Hi, I am an Albanian virus but because of poor technology in my\n" + |
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
| #!/usr/bin/env bash | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| php composer-setup.php | |
| php -r "unlink('composer-setup.php');" |
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 bin2(n, k) | |
| { | |
| const B = new Array(n+1).fill(0).map((x) => { | |
| return new Array(k+1).fill(0); | |
| }); | |
| for (let i = 0; i <= n; i++) { | |
| for (let j = 0; j <= Math.min(i,k); j++) { | |
| if (j === 0 || j === i) { | |
| B[i][j] = 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
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> | |
| <script defer src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | |
| <script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> | |
| <script defer src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> | |
| <template id="template-bs4-accordion-item"> | |
| <div class="card"> | |
| <div class="card-header" role="tab" id="headingOne"> | |
| <h5 class="mb-0"> | |
| <a data-toggle="collapse" |
OlderNewer