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 / github-readme-template
Created July 21, 2023 09:32
basic tutorial github template
---
SPDX-License-Identifier: MIT
path: "/tutorials/tutorial-template"
slug: "tutorial-template"
date: "2021-01-01"
title: "A great Tutorial Template! :+1:"
short_description: "This is a tutorial template, including metadata (the first few lines before the actual tutorial). Please fill in as much as possible. If you don't know what to put somewhere, just leave it empty, the Community manager will fill it for you."
tags: ["Development", "Lang:Go", "Lang:JS"]
author: "Your Name"
author_link: "https://github.com/....."
@dazeb
dazeb / SearchBar.vue
Last active July 17, 2023 23:12
nuxtlabs-searchbox-with-kbd-inside
<template>
<UInput
v-model="q"
name="q"
placeholder="Search..."
icon="i-heroicons-magnifying-glass-20-solid"
:ui="{ icon: { trailing: { pointer: '' } } }"
>
<template #trailing>
<div class="flex items-center gap-0.5">
@dazeb
dazeb / setup
Last active July 4, 2023 19:14
Nuxt3,Tailwind, Postcss, sass setup
# Nuxt 3 + Tailwind + Flowbite Setup With pnpm
1. Create a new Nuxt project
```bash
npx nuxi init <project-name>
```
1.1 Enable CorePack
@dazeb
dazeb / LinkGrid.vue
Created July 2, 2023 08:17
linkgrid
<template>
<section class="bg-white dark:bg-gray-900 dark:text-white">
<div
class="mx-auto max-w-screen-xl px-4 py-4 sm:py-6 sm:px-6 lg:py-16 lg:px-8"
>
<!-- <div class="mx-auto max-w-lg text-center">
<h2 class="text-3xl font-bold sm:text-4xl">Kickstart your marketing</h2>
<p class="mt-4 text-gray-500 dark:text-gray-300">
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Consequuntur
@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
@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 / 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

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

Oh my zsh.

Oh My Zsh

Install ZSH.

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

Install Oh my ZSH.

#/bin/bash
## taking.kr (webmaster@taking.kr)
## 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 ###############