| gitflow | git |
|---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop 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
| Route::get('redis', array('as' => 'cache', 'do' => function() | |
| { | |
| $redis = Redis::connection(); | |
| //STRING | |
| $redis->set('name', 'Taylor'); | |
| $name = $redis->get('name'); | |
| // LIST | |
| // A list is a series of ordered values. Some of the important commands for interacting with lists are RPUSH, LPUSH, LLEN, LRANGE, LPOP, and RPOP. |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the\commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
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 | |
| /** | |
| * Description of VideoStream | |
| * | |
| * @author Rana | |
| * @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial | |
| */ | |
| class VideoStream | |
| { | |
| private $path = ""; |
Install Supervisor with sudo apt-get install supervisor. Ensure it's started with sudo service supervisor restart.
In /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.
This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.
Now update Supervisor with: sudo supervisorctl reread. And start using those changes with: sudo supervisorctl update.
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
| " Don't try to be vi compatible | |
| set nocompatible | |
| " Helps force plugins to load correctly when it is turned back on below | |
| filetype off | |
| " TODO: Load plugins here (pathogen or vundle) | |
| " Turn on syntax highlighting | |
| syntax on |
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
| $ cd ~ | |
| $ sudo curl -sS https://getcomposer.org/installer | sudo php | |
| $ sudo mv composer.phar /usr/local/bin/composer | |
| $ sudo ln -s /usr/local/bin/composer /usr/bin/composer | |
| then you can run | |
| $ sudo composer install |
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 | |
| /** | |
| * A helper file for Laravel 5, to provide autocomplete information to your IDE | |
| * Generated for Laravel 5.5.13 on 2017-09-28. | |
| * | |
| * @author Barry vd. Heuvel <barryvdh@gmail.com> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ | |
| namespace { | |
| exit("This file should not be included, only analyzed by your IDE"); |
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
| <form action="" enctype="multipart/form-data" method="post"> | |
| <input id="file" name="file" type="file" /> | |
| <input id="Submit" name="submit" type="submit" value="Submit" /> | |
| </form> |
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
| final class DBConnection { | |
| private static $_handle = null; | |
| private static $_dsn = "mysql:dbname=mydb;host=my.host.com;port=3306"; | |
| private static $_user = "myUserName"; | |
| private static $_password = "myPassword"; | |
| private static $_options = array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"); // SET UTF-8 | |
| /** | |
| * Deny Construct | |
| */ |