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
#docker | |
alias docker-rm='docker rm $(docker ps -aq)' | |
alias docker-rmi='docker rmi $(docker images -q)' | |
alias docker-stop='docker stop $(docker ps -a -q)' | |
alias docker-ssh='docker-compose exec php bash' | |
alias docker-start='docker-compose up -d' | |
alias docker-ss='docker-stop && docker-start && docker-ssh' |
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/sh | |
/path/to/your/composer $* --profile | |
# and place the composer gist file in location like /usr/local/bin/composer |
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
:: save as file with *.bat extension | |
:: run as administrator | |
Net Stop Spooler | |
del %systemroot%\System32\spool\printers\* /Q | |
Net Start Spooler |
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\Console\Commands; | |
use Illuminate\Console\Command; | |
class DevCommand extends Command | |
{ | |
/** | |
* The console command name. |
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
# recursive download all page and linked subpages | |
wget -p -N -r -np http://url-to-download.com/page/ | |
# mass rename files | |
rename -v 's/\.php/\.html/' *.php | |
# batch replace text in files (recursive) | |
find . -type f -exec sed -i 's/.php/.html/g' {} + |
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
HashKnownHosts yes | |
GSSAPIAuthentication yes | |
GSSAPIDelegateCredentials no | |
ServerAliveInterval 60 | |
TCPKeepAlive yes |
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/sh | |
# script to convert tabs to spaces in PHP files | |
# usage: ./expand /path/to/project/directory | |
echo $(date) | |
path=${1:-.} | |
for f in $(find "$path" -type f -name \*.php -o -name \*.html -o -name \*.css -o -name \*.txt -o -name \*.js) | |
do |
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
#!/usr/bin/python | |
import sys | |
import os | |
os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5])) |
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/sh | |
path=${1:-.} | |
echo $path | |
echo $(date) | |
find "$path" -type d -exec chmod 755 {} \; | |
find "$path" -type f -exec chmod 644 {} \; |