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 | |
| // GET | |
| $request = $client->get($url, array('Accept' => 'application/json')); | |
| $response = $request->send(); | |
| if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) { | |
| // Error | |
| } |
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
| DB::statement("ALTER TABLE roles CHANGE COLUMN role role ENUM('system admin', 'super admin', 'admin staff', 'instructor', 'customer', 'gym member', 'swim member')"); |
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
| let dirtyString= "[Hello world]"; | |
| dirtyString.replace(/([^a-z0-9]+)/gi, ''); | |
| console.log(dirtyString); // Hello world | |
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
| # Chroot Jail for SSH Access | |
| # Tested on Ubuntu 14.04.2 LTS and Debian GNU/Linux 8 (jessie) | |
| # Reference : http://allanfeid.com/content/creating-chroot-jail-ssh-access | |
| # | |
| # Had to add/change several things to make it work, including: | |
| # - create lib64 folder | |
| # - copy whoami dependencies that ldd doesn't show to fix 'I have no name!' | |
| # in the customized prompt + create passwd file | |
| # |
NewerOlder