Skip to content

Instantly share code, notes, and snippets.

View jstott's full-sized avatar

Jim Stott jstott

View GitHub Profile
@jstott
jstott / wsl2-network.ps1
Created January 25, 2023 21:22 — forked from xmeng1/wsl2-network.ps1
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@jstott
jstott / setupmachine.bat
Created June 7, 2022 13:04 — forked from shanselman/setupmachine.bat
WinGet Setup a New Machine
winget install --id=Microsoft.VisualStudioCode -e && winget install --id=AgileBits.1Password -e && winget install --id=7zip.7zip -e && winget install --id=Twilio.Authy -e && winget install --id=Bethesda.Launcher -e && winget install --id=Microsoft.Bicep -e && winget install --id=Microsoft.bitsmanager -e && winget install --id=BrutalChess.BrutalChess -e && winget install --id=TechSmith.Camtasia -e && winget install --id=code52.Carnac -e && winget install --id=Docker.DockerDesktop -e && winget install --id=joncampbell123.DOSBox-X -e && winget install --id=JGraph.Draw -e && winget install --id=Dropbox.Dropbox -e && winget install --id=ElectronicArts.EADesktop -e && winget install --id=File-New-Project.EarTrumpet -e && winget install --id=Elgato.ControlCenter -e && winget install --id=Elgato.StreamDeck -e && winget install --id=EpicGames.EpicGamesLauncher -e && winget install --id=Figma.Figma -e && winget install --id=TimKosse.FileZilla.Client -e && winget install --id=BlastApps.FluentSearch -e && winget install
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jstott
jstott / git.migrate
Created February 17, 2019 19:17 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
define(['durandal/system', './transitionHelper'], function(system, helper) {
var settings = {
inAnimation: 'fadeInLeftBig',
outAnimation: 'fadeOutRight'
},
fadeIn = function(context) {
system.extend(context, settings);
return helper.create(context);
};