All your notes, scripts, config files and snippets deserve version control and tagging!
gist
is a simple bash script for gist management.
It is lightweight(~700LOC) and dependency-free! Helps you to boost coding workflow.
<# | |
.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 |
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.
FROM php:7.1.2-apache | |
RUN docker-php-ext-install mysqli |
# 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" |
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:
- 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
#!/bin/sh | |
docker exec -i mysql /usr/bin/mysql $@ -p2325373912 |
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.
- Install Git
- Install Git Bash via Git Tortoise install
- Added HOME=/c/Users/$USERNAME to C:\Program Files\Git\etc\profile
- See https://stackoverflow.com/questions/32232978/change-the-location-of-the-directory-in-a-windows-install-of-git-bash
- 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
- See https://blog.tiger-workshop.com/add-rsync-to-git-bash-for-windows/
- Put rsync.exe into C:\Program Files\Git\usr\bin
- Open Git Bash and create a key file using ssh-keygen
Download the package: http://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/rsync-3.1.2-2-x86_64.pkg.tar.xz
Extract it and move rsync.exe
to %HOMEDRIVE%%HOMEPATH%\AppData\Local\Programs\Git\usr\bin
.
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.
Only if you have docker desktop currently installed of course