Skip to content

Instantly share code, notes, and snippets.

View skobba's full-sized avatar

Gjermund Skobba skobba

View GitHub Profile
@skobba
skobba / git_rebase.sh
Created July 31, 2019 08:12
git interactive rebase
1) Rebase from VS Code
2) Select rebase plan (select interactive) in VS Code
3) If conflict -> solve conflicts in VS Code
4) Add changes
git add <files> (or in VS Code)
5) rebase
@skobba
skobba / proxmox-restart.sh
Created July 19, 2019 12:26
Proxmox restart
#!/bin/sh
systemctl restart pve-cluster
systemctl restart pvedaemon
systemctl restart pveproxy
systemctl restart pvestatsd
@skobba
skobba / lsblk.md
Created July 19, 2019 08:14
lsblk

List partitions w/ disk id and serial

lsblk -o name,model,serial

# git reset (n: number of commits)
git reset HEAD~n
# Rename branch
git branch -m <oldname> <newname>
git push -f
No upstream branch...
git push origin HEAD
@skobba
skobba / deploying-kubernetes-on-smartos.md
Last active February 17, 2021 04:59
Deploying Kubernetes on SmartIOS
tree -I "node_modules|bower_components" -L 3
# Recompose
A recompose stack is something like this:
import * as R from "recompose";
const enhance = R.compose(
R.withProps({text: "Click Me"}),
R.withStateHandler({ active: false }, {
onClick: ({ active }) => event => ({
active: !active,
}),
file-icons
@skobba
skobba / curl.sh
Last active February 18, 2021 00:36
curl
# POST w/ token
curl -H "Authorization: bearer $TOKEN" -H "Content-Type: application/json" -X POST -d '
{ "invoice":
{
"matter": "5bc9a264da9a42bee9c9cf48",
"unitPrice": 10200
}
}' http://localhost:4000/api/invoices
# POST