Skip to content

Instantly share code, notes, and snippets.

View riazul701's full-sized avatar

Md. Riazul Hasan Rahat riazul701

View GitHub Profile
@riazul701
riazul701 / README.md
Created November 29, 2022 19:47 — forked from typebrook/README.md
A bash script for gist management #bash #gist
@riazul701
riazul701 / shell-setup.ps1
Created December 13, 2022 08:22 — forked from mikepruett3/shell-setup.ps1
Packages to install via scoop, winget, choco, and other tools...
<#
.SYNOPSIS
Script to Initialize my custom powershell setup.
.DESCRIPTION
Script uses scoop
.NOTES
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted.
Author: Mike Pruett
Date: October 18th, 2018
@riazul701
riazul701 / PowerShell Customization.md
Created December 13, 2022 08:35 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@riazul701
riazul701 / Dockerfile
Created February 9, 2023 16:49 — forked from jcavat/Dockerfile
docker-compose with php/mysql/phpmyadmin/apache
FROM php:7.1.2-apache
RUN docker-php-ext-install mysqli
@riazul701
riazul701 / backup.ps1
Created February 11, 2023 17:01 — forked from stil/backup.ps1
Differential backup with 7zip and Powershell
# CONFIGURATION
$dirToBackup = "C:\Users\John" # path to directory we back up (no following backslash)
$outputDir = "E:\bak" # path directory we store our backups (no following backslash)
$params = '-t7z', '-r', '-ms=off', '-mx1'
# THE SCRIPT
$fullBackup = $outputDir + "\full.7z"
if (Test-Path ($fullBackup)) { # Let's check whether full backup exists
Write-Host "Full backup already exists"
@riazul701
riazul701 / path.md
Created February 22, 2023 14:49 — forked from nex3/path.md

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@riazul701
riazul701 / mysql
Created March 8, 2023 16:50 — forked from kekeimiku/mysql
Dbeaver connect to docker database unable to export and import temporary solutions. mysql/postgres
#!/bin/sh
docker exec -i mysql /usr/bin/mysql $@ -p2325373912
@riazul701
riazul701 / how-to-win-rsync-from-cmd.md
Created April 5, 2023 08:35 — forked from radleta/how-to-win-rsync-from-cmd.md
Step-by-step how to use rsync with git bash from Windows command prompt

Note: This works all except for the shell script part. Need to figure that out. You can do it interactively just not from the command prompt.

  1. Install Git
  2. Install Git Bash via Git Tortoise install
  3. Added HOME=/c/Users/$USERNAME to C:\Program Files\Git\etc\profile
  4. See https://stackoverflow.com/questions/32232978/change-the-location-of-the-directory-in-a-windows-install-of-git-bash
  5. Download rsync.exe from https://repo.msys2.org/msys/x86_64/rsync-3.2.3-2-x86_64.pkg.tar.zst use 7-zip to decompress
  6. See https://blog.tiger-workshop.com/add-rsync-to-git-bash-for-windows/
  7. Put rsync.exe into C:\Program Files\Git\usr\bin
  8. Open Git Bash and create a key file using ssh-keygen
@riazul701
riazul701 / add-rsync-to-git-bash.md
Created April 5, 2023 08:44 — forked from hisplan/add-rsync-to-git-bash.md
Add rsync to git bash for windows
@riazul701
riazul701 / migrating-away-from-docket-desktop.md
Created April 17, 2023 09:30 — forked from tdamsma/migrating-away-from-docker-desktop.md
Running VSCode remote containers on windows without docker desktop

Running VSCode remote containers on windows without docker desktop

Due to the license issues with docker desktop and the fact that you don't really need this buggy bit of software, this guide will walk you through the steps to use VSCode+remote-containers in combination with WSL2 without using docker desktop.

Get rid of docker desktop

Only if you have docker desktop currently installed of course

Uninstall docker desktop application