Skip to content

Instantly share code, notes, and snippets.

@zen0bit
zen0bit / git-get
Created February 29, 2024 05:09 — forked from rymndhng/git-get
Git Get
#!/bin/bash -x
#
# Clones Git Projects into directory of <projects_dir>/<group>/<repo_name>
#
# Tested with support for Github, Bitbucket & Sourcehut.
#
# By default, clones to $HOME/projects. This can be overriden by setting
# GIT_GET_PROJECTS_DIR to another directory.
#
# Usage:

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
Setting up xbps-src
Docs
1: https://wiki.voidlinux.eu/Xbps-src
2: https://github.com/voidlinux/void-packages/blob/master/Manual.md
3: https://github.com/voidlinux/void-packages/blob/master/README.md
clone https://github.com/voidlinux/void-packages.git
$ xbps-install xtools
@zen0bit
zen0bit / sugl.sh
Last active December 3, 2021 01:41
su GitLab (downloading all repositories from a given user)
#!/bin/bash
# Install jq [json bash parser]
# For void linux, for other distros just change "sudo xbps-install -S jq" to your package manager install command...
sudo xbps-install -S jq
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
@zen0bit
zen0bit / sugh.sh
Created December 3, 2021 01:32 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then

Keybase proof

I hereby claim:

  • I am zen0bit on github.
  • I am osowoso (https://keybase.io/osowoso) on keybase.
  • I have a public key ASCusFwHdta_1KuISfNmzWMyWk1ONskDnzCImxHBEbrGcgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am zenobit on github.
  • I am osowoso (https://keybase.io/osowoso) on keybase.
  • I have a public key ASCusFwHdta_1KuISfNmzWMyWk1ONskDnzCImxHBEbrGcgo

To claim this, I am signing this object:

@zen0bit
zen0bit / git-pushing-multiple.rst
Created September 10, 2021 07:17 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@zen0bit
zen0bit / git-pushing-multiple.rst
Created September 10, 2021 07:16 — forked from msztorc/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@zen0bit
zen0bit / void-install.sh
Created August 28, 2021 22:28
void-install.sh - Simple Void Linux unattended installation script
#!/bin/bash
ROOT=/mnt
DEV=${DEV:-/dev/vda}
BOOTDEV=${DEV}1
LVMDEV=${DEV}2
ROOTDEV=/dev/Main/Root
HOST=${HOST:-void-linux}
REPO=${REPO:-http://repo.voidlinux.com/current}
EXTRAS=${EXTRAS:-"rsync vim tmux socklog-void sv-helper"}
interactive=$1