Skip to content

Instantly share code, notes, and snippets.

View towfiqpiash's full-sized avatar
🌴
On vacation

Towfiqur Rahman towfiqpiash

🌴
On vacation
View GitHub Profile
@towfiqpiash
towfiqpiash / tricks.md
Last active November 18, 2019 07:01
Handy Tips & Tricks

Tips & Tricks!

Snippets of all helpful commands

Ionic Framework

Run this after clone to restore state

ionic state restore
@towfiqpiash
towfiqpiash / Laravel5-cheatsheet.md
Last active May 23, 2017 11:51
Laravel 5 Cheat Sheet

Laravel 5 Cheat Sheet

Artisan

// Added in 5.1.11:http://laravel.com/docs/5.1/authorization#creating-policies
php artisan make:policy PostPolicy

// Displays help for a given command
@towfiqpiash
towfiqpiash / git_cheatsheet.md
Last active July 23, 2017 04:51
All about git

Get latest changes from master to branch

git checkout piash      # gets you "on branch piash"
git fetch origin        # gets you up to date with origin
git merge origin/master

Merge detached head to origin/master

git checkout master && git merge [ref of HEAD]    # ref of HEAD = latest hash of detached head
@towfiqpiash
towfiqpiash / OrganizeFiles.sh
Last active July 4, 2021 20:34
Run this shell script to organize files into separate folders
#!/bin/bash
folders='Compressed Documents Images Music Programs Videos'
ext_comp="*.zip *.tar.gz *.tgz *.rar *.7z"
ext_doc="*.htm* *.php *.txt *.css *.doc* *.pdf *.PDF *.ppt* *.js *.csv"
ext_font="*.ttf"
ext_img="*.jp*g *.JPG *.png *.gif"
ext_music="*.mp3 *.aac *.wma"
ext_progrm="*.deb *.exe *.run *.sh"
ext_vid="*.mp4 *.mkv *.flv *.avi *.webm *.wmv"
@towfiqpiash
towfiqpiash / download-from-slideshare.md
Created July 23, 2017 04:58
How to download from slideshare

Right click on the slide image->copy image address, then do curl

curl -O <address>

To downloads all slides, link pattern is important. For example: to download 1–5 pages of the slide:

curl -O https://image.slidesharecdn.com/...[1–5]-638.jpg

Or, visit: http://grub.cballenar.me/

@towfiqpiash
towfiqpiash / create-wifi-hotspot.md
Last active July 25, 2018 08:47
Create WiFi hotspot on Ubuntu
  1. Disable Wifi (Uncheck Enable Wi-Fi)
  2. Go to network connection (Edit Connections...)
  3. Click "Add"
  4. Choose "Wi-Fi" and click "Create"
  5. Type in Connection name like "wifi-hotspot"
  6. Type in SSID as you wish
  7. Choose Device MAC Address from the dropdown (wlan0)
  8. Wifi Security select "WPA & WPA2 Personal" and set a password.
  9. Go to IPv4 Settings tab, from Method drop-down box select Shared to other computers.
  10. Then save and close.
@towfiqpiash
towfiqpiash / auto-indent-sublime-text3.md
Created July 23, 2017 05:05
Auto-indenting on Sublime Text 3

Just add this binding to your Preferences > "Key Bindings - User" file:

{"keys": ["alt+shift+f"], "command": "reindent", "args": {"single_line": false}}
@towfiqpiash
towfiqpiash / empty-value-for-port-specified.md
Created July 23, 2017 05:07
phpmyadmin with Mysql 5.7 - Empty value for 'port' specified

That's because you have the MySQL Password Validation plugin enabled (If you just type 'Y' to the dbconfig-common steps it will be enabled). I find it causes more trouble than good and its requirements (even on low) are superfluous for most. To disable it you'll want to run "UNINSTALL PLUGIN validate_password" once logged into the MySQL server, then try the GRANT again

@towfiqpiash
towfiqpiash / format-bootale-usb-stick.md
Created July 23, 2017 05:10
Format bootable USB stick on Ubuntu
  1. On your dash bar, type disks and lunch the program
  2. Select the disk or drive you want to format
  3. Press CTRL+F
  4. Click format.

After formatting, the disk or drive would be unallocated, therefore you'll have to create a partition by using the plus button on the screen.. Then insert the name you'll like to use as the drive or disk name then click on create. Enjoy....

@towfiqpiash
towfiqpiash / PowerLinux.md
Last active August 15, 2017 15:41
Learn few commands to make linux life a breeze

Which command I use most?

history | awk '{print $2}' | sort | uniq -c | sort -rn | head -10