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 / districts.json
Created September 28, 2017 05:17
All districts of bangladesh in JSON format
{
"data":{
"কুমিল্লা":null,
"ফেনী":null,
"ব্রাহ্মণবাড়িয়া":null,
"রাঙ্গামাটি":null,
"নোয়াখালী":null,
"চাঁদপুর":null,
"লক্ষ্মীপুর":null,
"চট্টগ্রাম":null,
@towfiqpiash
towfiqpiash / sync-hardware-datetime-with-system.md
Last active September 23, 2017 05:44
When your Linux date time is not same as hardware date time, this gist can be your guide

For quick adjustment, Check (2) and/or (4)

The clock that is managed by Linux kernel is not the same as the hardware clock. Hardware clock runs even when you shutdown your system. Hardware clock is also called as BIOS clock. You can change the date and time of the hardware clock from the BIOS. However, when the system is up and running, you can still view and set the hardware date and time using Linux hwclock command as explained in this tutorial.

1. Display Hardware Clock Date and Time

Just type hwclock, which will display the date and time of your system’s hardware clock. This is the same date and time that you’ll see from the BIOS screen. You can also use option -r, or –show to display the date and time.

# hwclock
@towfiqpiash
towfiqpiash / sublime-setting-user.json
Last active September 21, 2017 09:18
Small visual tweaks for sublime text
{
"line_padding_bottom": 5,
"line_padding_top": 5,
"fade_fold_buttons": false,
"bold_folder_labels": true
}
@towfiqpiash
towfiqpiash / orcale-jdk7-moved-permanently.md
Last active July 26, 2018 07:20
When apt-get installing oracle java 7 stopped working, try this

Or,

Install Oracle JDK 7 We assume that you already downloaded jdk-7u80-linux-x64.tar.gz file from Java archive download page.

Extract the downloaded file.

@towfiqpiash
towfiqpiash / laravel-erros.md
Last active September 10, 2017 10:12
Laravel related errors and solutions

[InvalidArgumentException] Script "post-install-cmd" is not defined in this package"

Solution#1

Run composer global self-update

Solution#2

Update laravel installer version first. To do this, change the version required in ~/config/composer/composer.json from ^1.3 to dev-master, then run composer update laravel/installer.

@towfiqpiash
towfiqpiash / fix-errors.md
Last active August 15, 2017 15:46
Commands to fix random errors

Google's missing GPG key error on apt update

wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
@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
@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 / 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 / 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}}