Skip to content

Instantly share code, notes, and snippets.

View SamEureka's full-sized avatar
🏚️
Working from home - CA

Sam Dennon SamEureka

🏚️
Working from home - CA
View GitHub Profile
@SamEureka
SamEureka / README.md
Last active September 28, 2023 12:17
Helix LSP Installs

Install instructions for Helix editor compatible LSPs

Language LSP Install
Bash bash-language-server npm i -g bash-language-server
CSS vscode-css-language-server npm i -g vscode-langservers-extracted
Docker dockerfile-language-server-nodejs npm i -g dockerfile-language-server-nodejs
Go gopls go install golang.org/x/tools/gopls@latest
HTML vscode-html-language-server npm i -g vscode-langservers-extracted
JSON vscode-json-language-server npm i -g vscode-langservers-extracted
@SamEureka
SamEureka / README.md
Last active July 30, 2023 10:33
ZSH and P10k for all

ZSH and P10k for all!

The idea behind this gist is to make this settings the default for all users

INstalling zsh and P10k to the correct places

  • sudo apt install -y zsh (debian based distro) sudo apk add zsh (alpine)
  • sudo git clone --depth=1 https://github.com/romkatv/powerlevel10k.git /usr/share/zsh/powerlevel10k
  • sudo git clone https://github.com/zsh-users/zsh-autosuggestions /usr/share/zsh/zsh-autosuggestions
  • sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /usr/share/zsh/zsh-syntax-highlighting
@SamEureka
SamEureka / README.md
Last active January 28, 2025 00:33
Install Let's Encrypt certs on TrueNAS Core or SCALE using ACME.sh deploy hooks

Install Let's Encrypt certs on TrueNAS Core or SCALE using ACME.sh deploy hooks

This information was spread out on several forum posts, blogs, wikis... etc. This gist is intended to collect all that information in one place so I don't have to dig it all up again. If you find it useful please leave a comment.

pre reqs

  • You need to have a working install of TrueNAS Core or SCALE. (I prefer SCALE... it is just better)
  • All of the following commands are performed in the shell on the NAS. (zsh is my prefered shell, these will work in bash)
  • You need an api key from your DNS provider (my example is Digital Ocean) and an api key for your NAS. See official documentation for instructions on generating. (not in the scope of this gist)
  • Your own domain

Install ACME.sh (one of the best scripts ever written)

@SamEureka
SamEureka / migrate.MD
Last active May 17, 2022 14:04
Migrate Libvirt VM using virsh migrate

Get the from virsh list It might be diferent from the display name in virt-manager.

virsh migrate --auto-converge --copy-storage-all --persistent --verbose <name> qemu+ssh://<new host>/system
  • Use the --undefinesource flag to delete the origial VM after migration.
  • Both new and old host need to have ssh root access setup with keys. They also need to resolve in DNS if host names are used.
@SamEureka
SamEureka / gist:cc1b596c92c03df58b06f0d1ce2a0a3c
Created September 28, 2020 19:28 — forked from dsci/gist:1347672
Delete commits from repository.
# First, check out the commit you wish to go back to (get sha-1 from git log)
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a
# Then do a forced update.
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop
# Push specific commit
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f
@SamEureka
SamEureka / docker-compose.yml
Last active February 18, 2025 20:52
Docker Compose file for Jira/Confluence/Postgres setup
version: '3.3'
services:
confluence-server:
depends_on:
- postgres-server
environment:
- JVM_MINIMUM_MEMORY=$JVM_MIN
- JVM_MAXIMUM_MEMORY=$JVM_MAX
- JVM_RESERVED_CODE_CACHE_SIZE=$JVM_HEAP
- ATL_PROXY_NAME=site.url
@SamEureka
SamEureka / index.html
Created October 24, 2017 17:38
Crafty Server landing page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>SamEureka's 'Crafty' - A Modded Minecraft Server!</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://use.typekit.net/mcq1pvw.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel='stylesheet' type='text/css'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css' rel='stylesheet' type='text/css'>
@SamEureka
SamEureka / stop.sh
Created October 24, 2017 15:50
stop script for multiple MC servers // not DRY yet
#!/bin/bash
# Check to see if direwolf is runing
dire=`screen -list | grep direwolf`
# TODO put this in a while loop to make it better
# (it's good enough for now)
# TODO make it all DRY
@SamEureka
SamEureka / start.sh
Created October 24, 2017 15:49
start script for multiple MC servers // needs ServerStart.sh
#!/bin/bash
# echo "Starting Direwolf on port: 25566"
# cd /home/sam/servers/direwolf && screen -dmS direwolf ./ServerStart.sh &
# echo "Starting Infinity on port: 25567"
# cd /home/sam/servers/infinity && screen -dmS infinity ./ServerStart.sh &
echo "Starting SkyFactory on port: 25565"
cd /home/sam/servers/skyfactory && screen -dmS skyfactory ./ServerStart.sh &
@SamEureka
SamEureka / check.sh
Created October 24, 2017 15:47
check script
#!/bin/bash
# Create an array with the screen instance names. (The screen names are 10 characters because I suck at REGEX)
LIST=(`screen -list |grep -o '[a-z]\{10\}'`)
# Iterate over the array to do the work.
for i in "${LIST[@]}"; do
# Create a working string variable with the name
work="$i"
check=`screen -list |grep $work`