Skip to content

Instantly share code, notes, and snippets.

View dazeb's full-sized avatar
🎯
Focusing

Darren Bennett dazeb

🎯
Focusing
View GitHub Profile
@dazeb
dazeb / frontmatter-blog.md
Created October 9, 2021 14:21
frontmatter blog template
## Tutorial

### Step 1: Create your first blog post

1. Create a new file called `my-fourth-post.md` in the `./src/blog` directory

Your file explorer should now look like this:

```{8}
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@dazeb
dazeb / Github Cheat Sheet
Created September 4, 2022 20:08 — forked from keeperofthenecklace/Github Cheat Sheet
Github Cheat Sheet
Step B.) Creating a branch (and switching to the new branch in one line (Step 2)
**********
a.) git checkout -b [name of new branch]
eg. git checkout -b 2012Tryme
git fetch origin [remote-branch]:[new-local-branch] (Pulling a new branch from a remote repository)
b.) follow step 1
c.) git push origin 2012Tryme
** will add new branch to the repository on git hub
**********************
Step A.) Scheduling the addition of all files to the next commit (Step 1)
@dazeb
dazeb / proxmox_nvidia.md
Created December 17, 2022 14:18 — forked from egg82/proxmox_nvidia.md
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

#/bin/bash
## taking.kr ([email protected])
## 2019-06-11
###########################################
read -p "hostname (ex taking.kr): " uhost
read -p "new username: " uname
read -p "$uname's Password: " upasswd
encrypt_pass=$(perl -e 'print crypt($ARGV[0], "password")' $upasswd)
############ nameserver setting ###############

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

This is a work in progress, proceed with caution

Install Proxmox and a Ubuntu VM with Portainer to manage docker containers

Setup Proxmox

  1. Install Proxmox 6.X iso I selected 2 drives in Raid 1 mirror
  2. Console/SSH into Proxmox
  3. nano /etc/apt/sources.list
@dazeb
dazeb / Host
Created February 2, 2023 22:47 — forked from lucndm/Host
Proxmox GPU passthrough to LXC Container
Note : Proxmox 6.1
VI : /etc/apt/sources.list
# security updates
deb http://security.debian.org jessie/updates main contrib
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian jessie pve-no-subscription
@dazeb
dazeb / nodesetup.sh
Last active May 15, 2023 16:09
New Node project
#!/bin/bash
# Ask for the project name
echo "Enter your new project name:"
read projectname
# Create directory and navigate into it
@dazeb
dazeb / remove-old-snaps.sh
Created May 23, 2023 20:17
Remove old snaps Ubuntu 22.04
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done