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
| sudo docker rmi `docker images | awk '($1 ~ /<none>/) {print $3}' | xargs` |
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
Show hidden characters
| { | |
| "color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme", | |
| "font_face": "Consolas", | |
| "font_size": 20, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ] | |
| } |
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
| curl -L https://github.com/docker/fig/releases/download/1.1.0-rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose; chmod +x /usr/local/bin/docker-compose |
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 | |
| if (isset($_COOKIE['MAGIC_COOKIE'])) { | |
| // MAGIC_COOKIE comes from a cookie. | |
| // Be sure to validate the cookie data! | |
| } elseif (isset($_GET['MAGIC_COOKIE']) || isset($_POST['MAGIC_COOKIE'])) { | |
| mail("admin@example.com", "Possible breakin attempt", $_SERVER['REMOTE_ADDR']); | |
| echo "Security violation, admin has been alerted."; | |
| exit; | |
| } else { |
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 | |
| // We wouldn't know where $username came from but do know $_SESSION is | |
| // for session data | |
| if (isset($_SESSION['username'])) { | |
| echo "Hello <b>{$_SESSION['username']}</b>"; | |
| } else { | |
| echo "Hello <b>Guest</b><br />"; | |
| echo "Would you like to login?"; | |
| } | |
| ?> |
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 | |
| // define $authorized = true only if user is authenticated | |
| if (authenticated_user()) { | |
| $authorized = true; | |
| } | |
| // Because we didn't first initialize $authorized as false, this might be | |
| // defined through register_globals, like from GET auth.php?authorized=1 | |
| // So, anyone can be seen as authenticated! | |
| if ($authorized) { | |
| include "/highly/sensitive/data.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
| <?php | |
| function CheckFTP($server, $id, $passwd, $port = 21) | |
| { | |
| //若任一欄位為空白則無效 | |
| if (empty($server) || empty($id) || empty($passwd)) | |
| return false; | |
| //連結FTP Server | |
| $fs = fsockopen ($server, $port, &$errno, &$errstr, 5); | |
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 CheckPOP3($server, $id, $passwd, $port = 110) | |
| { | |
| //若任一欄位為空白則無效 | |
| if (empty($server) || empty($id) || empty($passwd)) | |
| return false; | |
| // connect to POP3 Server | |
| $fs = fsockopen ($server, $port, &$errno, &$errstr, 5); | |
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
| <table width="400" align="center"> | |
| <tr> | |
| <td><?echo "共".$totalpage."頁,現在是第".$page."頁";?> | |
| </td> | |
| <td> | |
| <a href="<?=$PHP_SELF?>?page=1"title="最首頁">最首頁</a> | |
| <? | |
| if($page-$front_back<=1){ | |
| $front=1; | |
| }else{ |
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 | |
| include("../config.php"); | |
| $result = mysql_query("SELECT * FROM member"); | |
| $total = mysql_num_rows($result); | |
| if(!isset($page)) (int)$page=1; //若無設定$page, 則預設為1 | |
| $page_num = 2; //每頁設定顯示筆數 | |
| $front_back = 2; | |
| $begin = ($page-1) * $page_num; |