Program: /usr/local/bin/php-cs-fixer
Arguments: fix $ProjectFileDir$/src --rules=@Symfony,line_ending,full_opening_tag,indentation_type --verbose --show-progress=dots
Working Directory: $ProjectFileDir$
Keymap
Click or search for Keymap in settings. Then in the keymap window find External Tools and then again External Tools and Then whatever you named your external tool we just configured. Double click your external tool or the green pencil at the top and select Add Keyboard Shortcut from the list. Then type a key combo (I use Alt+F) and hit OK, and then, hit OK again on settings.
Friday, June 29, 2018
Alt-Tab does not switch immediately in xfce
Yes, I noticed that too! I'm surprised they forgot something as important as that.
Install CompizConfig Settings Manager:
To open terminal hit Alt+Ctrl+T and run following commands:
sudo apt-get install compizconfig-settings-manager
Or search for
compizconfig-settings-manager
in Software Center and install from there.
Then go to System Tools > Preferences > CompizConfig, if you can't find System Tools, look for
CompizConfig Settings Manager
in Unity Dash.
Go at the very bottom where it says Windows Management
Put a check-mark in Application Switcher
Set Up PHP Coding Standards Fixer for Sublime Text 3
Set Up PHP Coding Standards Fixer for Sublime Text 3 on OS X
Mario Rodriguez Jan 11 Originally published at mariorodriguez.co on Apr 07, 2016
You can save yourself quite some time by running a simple command to automatically format your PHP/Laravel code to follow the PSR-1 and PSR-2 standards. Let me show you how you can set it all up to work with Sublime Text 3 on OS X.
Install php-cs-fixer
You must have at least
PHP 5.3.6
on your system. Check with php --version
.
Run the following commands to download php-cs-fixer:
cd ~/Downloads
wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer
If you don’t have
wget
installed, follow these instructions to install it. Inspect this page so you can get the latest version.
or use
curl
:curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer
If you prefer a different download method such as composer or homebrew, check out these instructions.
Now that you’ve downloaded php-cs-fixer, make it executable:
sudo chmod a+x php-cs-fixer
Move it to a global location:
sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer
Check that it works by running:
php-cs-fixer
If everything is fine, you should see the version and usage information.
Configure a Build Command in Sublime Text 3
- Open Sublime Text
- Got to Tools > Build System > New Build System…
- Enter the following command and save:
{
"shell_cmd": "php-cs-fixer fix $file --level=psr2"
}
That’s it. When you run this command, php-cs-fixer will apply psr-2 standards to the current file you have open.
Run the command by pressing
Command + B
.
Cheers!
Tuesday, June 26, 2018
Sunday, June 17, 2018
Solution” to Intel Graphics Screen Tearing/Flickering Causes Excessive Fan Use in Ubuntu 16.10/17.04/17.10
https://askubuntu.com/questions/945895/solution-to-intel-graphics-screen-tearing-flickering-causes-excessive-fan-use?noredirect=1&lq=1
sudo gedit /usr/share/X11/xorg.conf.d/
20-intel-graphics.conf
Section "Device" Identifier "Intel Graphics" Driver "intel" Option "TripleBuffer" "true" Option "TearFree" "true" Option "DRI" "false" EndSection
Saturday, June 16, 2018
Tuesday, June 12, 2018
Find and delete files recursively in unix
recursively list files by extension
recursively delete them
find ./ -type f | awk -F . '{print $NF}' | sort --uniquerecursively list files by specific extension
find . -type f -iname "*.css"
recursively delete them
find . -name "*.html" -type f -delete
Monday, June 11, 2018
Docker wordpress
mkdir wordpress
cd wordpress
touch docker-compose.yml
vi docker-compose.yml
version: '3.3'
services:
db:
image: mysql:5.7
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
volumes:
db_data:
docker image prune --all
docker-compose restart
docker-compose build
docker-compose stop
docker-compose start
docker-compose up
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 80/tcp
sudo ufw allow 3306
sudo service ufw restart
sudo ufw status
cd wordpress
touch docker-compose.yml
vi docker-compose.yml
version: '3.3'
services:
db:
image: mysql:5.7
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
ports:
- "80:80"
restart: always
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
volumes:
db_data:
docker image prune --all
docker-compose restart
docker-compose build
docker-compose stop
docker-compose start
docker-compose up
sudo ufw enable
sudo ufw allow ssh
sudo ufw allow 80/tcp
sudo ufw allow 3306
sudo service ufw restart
sudo ufw status
Subscribe to:
Posts (Atom)
Git get all remote branches
git branch -r \ | grep -v '\->' \ | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \ | while read remote; do \ git branc...
-
sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...
-
Known Issues Firefox 3.5 will only support color profiles as specified by ICC v2, later versions will add su...