Skip to content

Instantly share code, notes, and snippets.

View imtiazShakil's full-sized avatar
🤍
Alhamdulillah always

Imtiaz Shakil Siddique imtiazShakil

🤍
Alhamdulillah always
View GitHub Profile
@imtiazShakil
imtiazShakil / sublime-text-3-windows-shortcuts.md
Created August 14, 2020 17:52 — forked from mrliptontea/sublime-text-3-windows-shortcuts.md
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@imtiazShakil
imtiazShakil / mysql-setup.md
Last active January 4, 2022 09:58
Setup MySQL 8+ on Linux

For Older Linux distributions (Optional)

Download latest apt-config package from mysql and install it: https://dev.mysql.com/downloads/repo/apt/ Make sure you provide the latest release(focal/buster) during apt-package installation.


Install

sudo apt update
@imtiazShakil
imtiazShakil / Powershell-basics.md
Last active September 23, 2024 08:18
Basic commands for daily life usage of powershell

Unix head, tail, sed equivalent commands in Windows Powershell

Get-Content (alias: gc) is your usual option for reading a text file.

gc log.txt -head 10 
gc log.txt -tail 10
gc log.txt -tail 10 -wait # equivalent to tail -f
gc log.txt | %{ $_ -replace '\d+', '($0)' }         # sed
@imtiazShakil
imtiazShakil / setup-java.md
Last active June 30, 2024 09:06
Installing Java on a fresh linux server

Installing jdk 21 by eclipse-temurin

sudo apt-get install -y wget apt-transport-https gpg
sudo wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
# For Linux Mint (based on Ubuntu) you have to replace VERSION_CODENAME with UBUNTU_CODENAME. 
echo "deb https://packages.adoptium.net/artifactory/deb $(awk -F= '/^UBUNTU_CODENAME/{print$2}' /etc/os-release) main" | sudo tee /etc/apt/sources.list.d/adoptium.list



sudo apt-get update
@imtiazShakil
imtiazShakil / maven-tricks.md
Last active December 14, 2021 13:09
Maven Tips & Tricks

Maven select profile

./mvnw clean install -P myprofie

Run Maven goals from another directory

./mvnw -f /location/to/different/pom/directory clean package

Maven select specific project (in a multi module project)

./mvnw clean install -pl 'child-project'

Maven skip specific project (in a multi module project)

@imtiazShakil
imtiazShakil / curl.md
Last active March 13, 2024 06:39 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@imtiazShakil
imtiazShakil / DateTime Techniques.txt
Last active January 15, 2020 14:34
Best way to store DateTime in Mysql and read/write on them in Java
Question: Which Mysql Data Type to use and when?
1. Can your application supply / read / assume that all dates are UTC, and you want performance?
=> INTEGER as a unix timestamp.
2. Can your application supply / read / assume that all dates are UTC, or you need to store dates older than 1970 or after 2038, but want them to be human readable?
=> DATETIME
3. Do you need a fixed point in time regardless of timezones, and will your code assume the value you get is in the local timezone of the MySQL server?
=> TIMESTAMP