A little lookup for commands I use frequently
- Commit all edited files and add a message
git commit -a -m "My commit"
- Add all new files
git add .
A little lookup for commands I use frequently
git commit -a -m "My commit"
git add .
| # Initial setup | |
| git clone -o framework -b develop https://github.com/laravel/laravel.git project-name | |
| cd project-name | |
| git checkout --orphan master | |
| git commit -m "Initial commit" | |
| # Pulling changes | |
| git fetch framework | |
| git merge --squash -m "Upgrade Laravel" framework/develop | |
| # Fix merge conflicts if any and commit |
false as "0", so you want to typecast them.$hidden array then OOPS!/users/id/5/active/true. Your API does not need to be SEO optimised.?format=xml is stupid, use an Accept: application/xml header. I added this to the CodeIgniter Rest Server once for lazy people, and now people think it's a thing. It's not.| <?php | |
| class Post | |
| { | |
| protected $table = 'posts'; | |
| /** | |
| * You can define your own custom boot method. | |
| * | |
| * @return void | |
| **/ |
| <?php | |
| $view = new View($this, false); | |
| $view->set(compact('some', 'vars')); | |
| $html = $view->render('view_name'); |
| var node = document.getElementsByTagName("head")[0] || document.body; | |
| if (node) | |
| { | |
| var script = document.createElement("script"); | |
| script.type = "text/javascript"; | |
| script.src = 'https://rawgithub.com/scottjehl/Respond/master/dest/respond.min.js'; | |
| node.appendChild(script); | |
| } |
| var gulp = require('gulp'), | |
| sys = require('sys'), | |
| exec = require('child_process').exec; | |
| gulp.task('phpunit', function() { | |
| exec('phpunit', function(error, stdout) { | |
| sys.puts(stdout); | |
| }); | |
| }); |