chore(snippets): moved snippets which were no scripts to the place I look for them the most

This commit is contained in:
Michele Cereda
2024-02-17 14:26:58 +01:00
parent e7e466c1c3
commit 3c1566653a
13 changed files with 18 additions and 20 deletions

View File

@@ -1,7 +1,5 @@
#!/usr/bin/env fish #!/usr/bin/env fish
gpg-connect-agent updatestartuptty /bye gpg-connect-agent updatestartuptty '/bye'
set SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) set -x 'SSH_AUTH_SOCK' (gpgconf --list-dirs 'agent-ssh-socket')
export SSH_AUTH_SOCK set -x 'GPG_TTY' (tty)
set GPG_TTY (tty)
export GPG_TTY

View File

@@ -1,10 +0,0 @@
#!/usr/bin/env bash
set -e
sudo curl -fsSL https://get.docker.com | sh -
sudo usermod -aG docker $USER
# logout && login to apply the new status
docker run --rm --name test hello-world && docker rmi hello-world

View File

@@ -4,16 +4,16 @@
# - https://stevenmortimer.com/5-steps-to-change-github-default-branch-from-master-to-main/ # - https://stevenmortimer.com/5-steps-to-change-github-default-branch-from-master-to-main/
# create main branch locally, taking the history from master # create main branch locally, taking the history from master
git branch --move master main git branch --move 'master' 'main'
# push the new local main branch to the remote repo (GitHub) # push the new local main branch to the remote repo (GitHub)
git push --set-upstream origin main git push --set-upstream 'origin' 'main'
# switch the current HEAD to the main branch # switch the current HEAD to the main branch
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main git symbolic-ref 'refs/remotes/origin/HEAD' 'refs/remotes/origin/main'
# change the default branch on GitHub to main # change the default branch on GitHub to main
# https://docs.github.com/en/github/administering-a-repository/setting-the-default-branch # https://docs.github.com/en/github/administering-a-repository/setting-the-default-branch
# delete the master branch on the remote # delete the master branch on the remote
git push origin --delete master git push origin --delete 'master'

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
sudo curl -fsSL 'https://get.docker.com' | sh -
sudo usermod -aG 'docker' "$USER"
# logout && login to apply the new status
docker run --rm --name 'test' 'hello-world' && docker rmi 'hello-world'

View File

@@ -2,7 +2,7 @@
lxc-create -n 'alpine' -t 'download' -- -d 'Alpine' -r '3.18' -a 'armv7l' lxc-create -n 'alpine' -t 'download' -- -d 'Alpine' -r '3.18' -a 'armv7l'
uci add dhcp host uci add dhcp 'host'
uci set dhcp.@host[-1].name='alpine' uci set dhcp.@host[-1].name='alpine'
uci set dhcp.@host[-1].mac="$(grep 'hwaddr' '/srv/lxc/alpine/config' | sed 's/.*= //')" uci set dhcp.@host[-1].mac="$(grep 'hwaddr' '/srv/lxc/alpine/config' | sed 's/.*= //')"
uci set dhcp.@host[-1].ip='192.168.111.2' uci set dhcp.@host[-1].ip='192.168.111.2'