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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title></title> | |
| <style> | |
| html, body { | |
| margin: 0; | |
| height: 100%; |
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
| /* | |
| 1) 打開 https://popcat.click | |
| 2) 打開主控台 (F12 / command + options + i) | |
| 3) 複製貼上 + enter | |
| */ | |
| var event = new KeyboardEvent('keydown', { | |
| key: 'g', | |
| ctrlKey: true |
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
| <audio controls="controls" id="audioEl"> | |
| <source src="http://datashat.net/music_for_programming_41-sunjammer.mp3" /> | |
| </audio> | |
| <button id="fadeoutbutton">Fadeout</button> | |
| <button id="fadeinbutton"> | |
| Fadein | |
| </button> | |
| var audio = document.getElementById('audioEl'); |
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 xfvz mysql-5.7*.tar.gz | |
| echo "stopping mamp" | |
| sudo /Applications/MAMP/bin/stop.sh | |
| sudo killall httpd mysqld | |
| echo "creating backup" | |
| sudo rsync -arv --progress /Applications/MAMP ~/Desktop/MAMP-Backup | |
| echo "copy bin" |
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
| const temp = { | |
| "data": | |
| { | |
| "id": "1", | |
| "type": "budget_template", | |
| "attributes": | |
| { | |
| "name": "Thuggin", | |
| "typing": "main", | |
| "enabled": true |
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
| var phpTimestamp = 1513047372; | |
| moment.unix(phpTimestamp).utc().format('YYYY/MM/DD') |
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 Log | |
| { | |
| private $type = ''; | |
| public function setLog($type, $message) | |
| { | |
| $now = new DateTime('now'); | |
| $defaultLog = array( | |
| 'destination' => 'logs/'.$now->format('Y-m-d')."_$type.log", |
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 Database | |
| { | |
| private $servername; | |
| private $username; | |
| private $password; | |
| private $dbname; | |
| private $conn; |
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 | |
| /***** config *****/ | |
| $cols = [ | |
| //[type, 'dbCols', 'jsonName'] | |
| ['s', 'source', null], | |
| ['s', 'photo_id', 'photo_id'], | |
| ['s', 'user_id', 'owner_id'], | |
| ['d', 'latitude', 'latitude'], | |
| ['d', 'longitude', 'longitude'], | |
| ['s', 'photo_title', 'photo_title'], |
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 | |
| abstract class Database | |
| { | |
| public function __construct() | |
| { | |
| $this->connect(); | |
| } | |
| abstract public function connect(); |