As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
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 | |
$finder = PhpCsFixer\Finder::create() | |
->exclude(['bootstrap', 'node_modules', 'public', 'storage', 'vendor']) | |
->notPath('*') | |
->in(__DIR__); | |
return PhpCsFixer\Config::create() | |
->setRiskyAllowed(true) | |
->setRules(array( |
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
function dc() { | |
# check if there is a docker-compose.yml or docker-compose.yaml file in the current directory | |
if [ -f "./docker-compose.yml" ] || [ -f "./docker-compose.yaml" ]; then | |
print -P "%F{green}./docker-compose.yml%f" | |
( docker-compose $* ) | |
return 0 | |
fi | |
# check if there is a docker directory with a docker-compose.yml or docker-compose.yaml in it. | |
if [ -f "./docker/docker-compose.yml" ] || [ -f "./docker/docker-compose.yaml" ]; then |
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 Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreatePostTagPivotTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
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
# add homestead function to terminal | |
function homestead() { | |
( cd ~/Homestead && vagrant $* ) | |
} |
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
<snippet> | |
<content><![CDATA[ | |
${5} | |
${1:public }function ${2:name}(${3:params})${4:: void} | |
{ | |
${6:// some code} | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>method</tabTrigger> |
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
Show hidden characters
[ | |
{ | |
"keys": ["j", "j"], | |
"command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] | |
}, |
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
#!/bin/bash | |
echo "********************" | |
echo "Post receive hook: Updating website" | |
echo "********************" | |
#set the git repo dir | |
GIT_REPO_DIR=~/git/<repo>.git | |
echo "The git repo dir is $GIT_REPO_DIR" |
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 | |
/* | |
|-------------------------------------------------------------------------- | |
| Country Codes | |
|-------------------------------------------------------------------------- | |
| | |
| Array of available country codes to generate form fields and stuff like | |
| that. | |
| |