View phpstorm.vmoptions
-agentlib:yjpagent=probe_disable=*,disablealloc,disabletracing,onlylocal,disableexceptiontelemetry,delay=10000,sessionname=PhpStorm2016.3
-Dide.no.platform.update=true
-Dsun.io.useCanonCaches=false
-ea
-server
-Xms2048m
-Xmx4096m
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
-XX:+CMSIncrementalMode
View url.sh
#!/bin/bash
urlencode() {
# urlencode <string>
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%s' "$c" | xxd -p -c1 |
while read c; do printf '%%%s' "$c"; done ;;
View rename-spaces-to-underscores.sh
find . -depth -name '* *' \
-execdir bash -c 'mv "$1" "${1// /_}"' _ {} \;
View get-ip-location.sh
#!/bin/bash
# Without $1, it'd use your Public IP
curl -s http://ip-api.com/json/$1 | python -m json.tool
View docker-kill-all.sh
#!/bin/bash
# Kill all running containers
docker kill $(docker ps -q)
View camelize.sh
#!/bin/bash
perl -pe 's/(^|_)./uc($&)/ge;s/_//g'
View mysql-restore.sh
echo "Restoring $1"
queries="
-- Set network buffer length to a large byte number\n
set global net_buffer_length=1000000;\n
-- Set maximum allowed packet size to a large byte number\n
set global max_allowed_packet=1000000000;\n
-- Disable foreign key cheking to avoid delays,errors and unwanted behaviour\n
SET foreign_key_checks = 0;\n
source $2;\n
View .bash_pfm
#export COMPOSE_FILE="docker-compose.yml:docker-compose.vbe.yml"
alias b='brew'
alias bs='brew services'
alias bsr='bs restart'
alias bssr='bs start'
alias bsst='bs stop'
alias bsl='bs list'
alias bupt='b update'
alias bupg='b upgrade'
alias bup='bupt; bupg'
View sublime-cli.sh
ln -s /Applications/Sublime\ Text\.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
View fix-docker-symfony-exception-source-urls.sh
# the first 2 steps are needed if the project dir inside container is inside /home.
sudo vi "+g/^\/home/s/\//#\//" "+x" /etc/auto_master
diskutil umount /home
sudo ln -s ~/Path/to/projects/on/host /path/to/projects/inside/docker/container
# say:
# sudo ln -s ~/projects/company/ /home/www-data