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
| license: gpl-3.0 | |
| redirect: https://observablehq.com/@d3/zoomable-map-tiles |
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/sh | |
| ## backup each mysql db into a different file, rather than one big file | |
| ## as with --all-databases. This will make restores easier. | |
| ## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
| ## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
| ## Create the user and directories | |
| # mkdir -p /var/backups/mysql/databases | |
| # useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
| ## Remember to make the script executable, and unreadable by others |
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
| CREATE DATABASE profs; | |
| USE profs; | |
| CREATE TABLE professors ( | |
| name varchar(30) NOT NULL, | |
| specialization varchar(20), | |
| salary double(8,2), | |
| CONSTRAINT prof_pk PRIMARY KEY (name)); | |
| CREATE TABLE students ( |
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 Controller_User extends Controller_Rest | |
| { | |
| protected function validateHash() | |
| { | |
| $request = file_get_contents('php://input'); | |
| $requestHeaders = apache_request_headers(); | |
| if (!isset($requestHeaders['X-Auth']) || !isset($requestHeaders['X-Auth-Hash'])) { | |
| $this->response('fail!',401); |
NewerOlder