This file contains 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
git remote add upstream /url/to/original/repo | |
git fetch upstream | |
git checkout master | |
git reset --hard upstream/master | |
git push origin master --force |
This file contains 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
git update-index should do what you want | |
This will tell git you want to start ignoring the changes to the file | |
git update-index --assume-unchanged path/to/file | |
When you want to start keeping track again | |
git update-index --no-assume-unchanged path/to/file |
This file contains 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
git push origin --delete the_remote_branch |
This file contains 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
git fetch upstream | |
git checkout develop | |
git merge upstream/develop | |
git merge upstream/develop | |
git push origin develop |
This file contains 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
git add -A stages All | |
git add . stages new and modified, without deleted | |
git add -u stages modified and deleted, without new | |
unstaged file | |
git reste <filepath> | |
command to ignore file | |
This will tell git you want to start ignoring the changes to the file |
This file contains 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
SELECT concat('alter table ',table_schema,'.',table_name,' DROP FOREIGN KEY ',constraint_name,';') | |
FROM information_schema.table_constraints | |
WHERE constraint_type='FOREIGN KEY' | |
AND table_schema='!!YOUR_SCHEMA_HERE!!'; |
This file contains 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 | |
/** | |
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org) | |
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) | |
* | |
* Licensed under The MIT License | |
* For full copyright and license information, please see the LICENSE.txt | |
* Redistributions of files must retain the above copyright notice. | |
* | |
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) |
This file contains 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 | |
use Migrations\AbstractSeed; | |
/** | |
* Customers seed. | |
*/ | |
class CustomersSeed extends AbstractSeed | |
{ | |
/** | |
* Run Method. |
This file contains 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 namespace App\Database\Migrations; | |
use CodeIgniter\Database\Migration; | |
class Migration_create_posts_table extends Migration | |
{ | |
public function up() | |
{ | |
$this->forge->addField([ | |
'id' => [ |
This file contains 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
lorenzo [9:27 PM] | |
I sued decorator for a bunch of stuff, but where it is more obvious is in the result set | |
the statement object is a decorator for pdo statement | |
the code that casts the results to the right type (int, dates…) is a decorator of the statement | |
the code that converts the rows to entities is a decorator of the statement… | |
formatResults is a decorator of the result set |
OlderNewer