- Ubuntu
- PHPStorm
Install jayatana
sudo add-apt-repository ppa:danjaredg/jayatanasudo apt-get updatesudo apt-get install jayatana
| #redirect | |
| this.$route.router.go('/'); |
| window.axios.defaults.headers.common['X-API-TOKEN'] = window.user.api_token; | |
| axios.defaults.baseURL = 'https://www.example.com/demos/app'; |
| #test ssd speed: | |
| sudo hdparm -t /dev/sdb1 | |
| #test TRIM | |
| sudo hdparm -I /dev/sda | grep "TRIM supported" | |
| sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d) | |
| UUID=a6ed37e6-ee89-4621-bd35-a5e9466275ac / ext4 noatime,discard,errors=remount-ro 0 1 | |
| #swap | |
| sysctl -w vm.swappiness=10 |
| #!/usr/bin/env bash | |
| username=$(/usr/bin/whoami) | |
| pid=$(pgrep -u $username nautilus) | |
| dbus=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$pid/environ | sed 's/DBUS_SESSION_BUS_ADDRESS=//' ) | |
| export DBUS_SESSION_BUS_ADDRESS=$dbus | |
| free=$(free -mt | grep Mem | awk '{print $4}') | |
| echo $free | |
| ## check if free memory is less or equals to 1000MB | |
| if [[ "$free" -le 1000 ]]; then |
| SELECT * | |
| FROM contacts | |
| WHERE | |
| DATE_FORMAT(birthday,'%m-%d') = DATE_FORMAT(NOW(),'%m-%d') |
| sudo fdisk -l | |
| sudo mount -t ntfs /dev/sdb1 /media |
| import quill_module from 'quill_module' | |
| <ReactQuill modules={quill_module} theme="snow" value={this.state.text} onChange={this.handleChange} /> |
| use Illuminate\Support\Facades\Schema; | |
| public function boot() | |
| { | |
| Schema::defaultStringLength(191); | |
| } |
| php -d extension=phar.so composer.phar <your_script> |