start new:
tmux
start new with session name:
tmux new -s myname
| git init - navigate to the appropriate directory and just type that. | |
| git add . - adds everything in that path | |
| git commit -m 'stuff' - Commits with the message 'stuff' | |
| git branch - views branches | |
| git checkout -b <new branch> - Creates & switches to new branch | |
| git checkout <branch> - switches to branch | |
| git merge <branch> - merges that branch to the existing branch that you're already in. | |
| git branch -d <branch> - deletes branch | |
| git push - This assumes you already have a remote setup (like github) |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| ## | |
| # Creates an alias called "git hist" that outputs a nicely formatted git log. | |
| # Usage is just like "git log" | |
| # Examples: | |
| # git hist | |
| # git hist -5 | |
| # git hist <branch_name> | |
| # git hist <tag_name> -10 | |
| ## | |
| git config --global alias.hist "log --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(red)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --graph --date=short" |
| Add-Type -AssemblyName System.Windows.Forms | |
| while ($true) | |
| { | |
| $Pos = [System.Windows.Forms.Cursor]::Position | |
| $x = ($pos.X % 500) + 1 | |
| $y = ($pos.Y % 500) + 1 | |
| [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
| Start-Sleep -Seconds 10 | |
| } |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| #!/bin/bash | |
| # Receives your Windows username as only parameter. | |
| curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl | |
| chmod +x ./kubectl | |
| sudo mv ./kubectl /usr/local/bin/kubectl | |
| windowsUser=$1 |
» sudo systemctl daemon-reload
System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
==============================================
Edit*
/etc/wsl.conf with any editor:Random set of notes and links that have helped me in the saga to get Ubuntu 22.04 up and running on my 2017 MacBook Pro These notes are mainly for myself in the event that I have to do this again some day. But if you find them helpful, that's great.
Unfortunately the MacBookPro that I bought second hand turned out to be a dud with some serious hardware flaws that didn't show up until a couple of months after I'd bought it.
I've since purhcased another laptop so I'm not going to be able to maintain this GIST.
I'll leave it here for now in case others want to contribute updates, or clone it. If you feel it's out of date or misleading or a waste of time, let me know in the comments and I'll remove it.