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 | |
| /** | |
| * Clean comments of json content and decode it with json_decode(). | |
| * Work like the original php json_decode() function with the same params | |
| * | |
| * @param string $json The json string being decoded | |
| * @param bool $assoc When TRUE, returned objects will be converted into associative arrays. | |
| * @param integer $depth User specified recursion depth. (>=5.3) | |
| * @param integer $options Bitmask of JSON decode options. (>=5.4) | |
| * @return array/object |
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 bcrypt($password) | |
| { | |
| $hash = password_hash($password, PASSWORD_BCRYPT, ['cost' => 10]); | |
| if ($hash === false) | |
| { | |
| throw new RuntimeException('Bcrypt hashing not supported.'); | |
| } |
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
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin master |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <zabbix_export> | |
| <version>2.0</version> | |
| <date>2013-12-04T16:01:36Z</date> | |
| <groups> | |
| <group> | |
| <name>Templates</name> | |
| </group> | |
| </groups> | |
| <templates> |
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 user group | |
| sudo groupadd laravel | |
| ## add composer user to group | |
| sudo gpasswd -a composer-user laravel | |
| ## add web server to group | |
| sudo gpasswd -a apache laravel | |
| ## jump to laravel path |
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 TABLE `countries` ( | |
| `id` int(11) NOT NULL auto_increment, | |
| `code` varchar(2) NOT NULL default '', | |
| `title` varchar(100) NOT NULL default '', | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci | |
| -- | |
| -- Dumping data for table `countries` | |
| -- | |
| INSERT INTO `countries` VALUES (null, 'AF', 'Afghanistan'); |
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
| ([a-zA-Z0-9\._-]+@[A-Za-z0-9_-]+?\.[A-Za-z.]{2,16}) |