Skip to content

Instantly share code, notes, and snippets.

View Neo-Desktop's full-sized avatar
🙃

Neo Neo-Desktop

🙃
  • San Diego, CA
View GitHub Profile
@Neo-Desktop
Neo-Desktop / mp3collect.go
Created February 17, 2020 09:04 — forked from swdunlop/mp3collect.go
a simple utility to hardlink mp3 files to a hash of their non-ID3 contents
package main
import "io"
import "os"
import "fmt"
import "encoding/hex"
import "crypto/sha256"
import "path"
import "strings"
@Neo-Desktop
Neo-Desktop / install-user-to-sudoersd.sh
Created June 2, 2018 07:38 — forked from ivanrad/install-user-to-sudoersd.sh
Add user to sudoers (ALL NOPASSWD)
#!/bin/bash
#
# Add user to sudoers (ALL NOPASSWD).
# Usage: $0 [username] (if no username provided, the username of the current user is used)
#
[ $UID -eq 0 ] ||
{ echo "This script needs to be run with sudo -- \"sudo `basename $0`\"."; exit 1; }
[ -z "$1" ] && SUDOERS_USERNAME=$SUDO_USER || SUDOERS_USERNAME=$1
@Neo-Desktop
Neo-Desktop / center_func.sh
Last active December 1, 2022 20:50
Bash function to vertically/horizontally center text
#!/bin/bash
##
# Horizontaly centers a line of text
#
# @method hcenter
# @param string $text - splat of text
#
##
function hcenter {
@echo off
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text" /t REG_SZ /v "" /d "Open with Sublime Text" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f