Skip to content

Instantly share code, notes, and snippets.

View kurobeats's full-sized avatar
😀
wiew

Anthony Cozamanis kurobeats

😀
wiew
View GitHub Profile
@kurobeats
kurobeats / instruct.md
Last active January 31, 2021 10:35
Using Fedora 33 with Microsoft’s WSL2
@kurobeats
kurobeats / macOS.xml
Created March 5, 2017 06:00
libvirt OSX
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit macOS
or other application using the libvirt API.
-->
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>macOS</name>
<uuid>6e79e797-26e8-4cc2-8a37-53695cc5b3b8</uuid>
@kurobeats
kurobeats / mac_zshrc
Created August 3, 2020 11:45
mac_zshrc
# System-wide profile for interactive zsh(1) shells.
# Setup user specific overrides for this in ~/.zshrc. See zshbuiltins(1)
# and zshoptions(1) for more details.
# Correctly display UTF-8 with combining characters.
if [[ "$(locale LC_CTYPE)" == "UTF-8" ]]; then
setopt COMBINING_CHARS
fi
@kurobeats
kurobeats / joplin_install_and_update.sh
Last active July 21, 2020 01:00
joplin to be installed in a nice way
#!/bin/bash
set -e
#-----------------------------------------------------
# Variables
#-----------------------------------------------------
COLOR_RED=`tput setaf 1`
COLOR_GREEN=`tput setaf 2`
COLOR_RESET=`tput sgr0`
SILENT=false
@kurobeats
kurobeats / salt_windows_install.ps1
Last active July 6, 2020 16:54
powershell install salt-minion
$saltversion = "Salt-Minion-2018.3.2-Py3-AMD64-Setup.exe"
$source = "https://repo.saltstack.com/windows/$saltversion"
$destination = "c:\temp\$saltversion"
Set-Location C:\temp
wget $source -OutFile $destination
iex 'c:\temp\Salt-Minion-2018.3.2-Py3-AMD64-Setup.exe /S /master=salt-master /minion-name=$env:computername'
@kurobeats
kurobeats / mpdsetup.sh
Last active February 14, 2020 00:22
From http://dl.53280.de/mpdsetup.sh before it went down
#!/bin/bash
clear
username=$(whoami)
interface=`ip route show | cut -d ' ' -f 3 | head -1`
interface=$(ip route show | awk '{print $NF}' | tail -1)
echo "What is the full path of the directory containing your music?"
read -e -p "> " music_dir
if test -n "$(pgrep pulseaudio)";
then
@kurobeats
kurobeats / pia-nm.sh
Last active November 22, 2019 12:51
Install OpenVPN profiles in NetworkManager for PIA
#!/bin/bash
#
# Install OpenVPN profiles in NetworkManager for PIA
#
error() {
echo $@ >&2
exit 255
}
@kurobeats
kurobeats / zt-gpg-key
Last active November 4, 2019 12:23
Zerotier PGP
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFdQq7oBEADEVhyRiaL8dEjMPlI/idO8tA7adjhfvejxrJ3Axxi9YIuIKhWU
5hNjDjZAiV9iSCMfJN3TjC3EDA+7nFyU6nDKeAMkXPbaPk7ti+Tb1nA4TJsBfBlm
CC14aGWLItpp8sI00FUzorxLWRmU4kOkrRUJCq2kAMzbYWmHs0hHkWmvj8gGu6mJ
WU3sDIjvdsm3hlgtqr9grPEnj+gA7xetGs3oIfp6YDKymGAV49HZmVAvSeoqfL1p
pEKlNQ1aO9uNfHLdx6+4pS1miyo7D1s7ru2IcqhTDhg40cHTL/VldC3d8vXRFLIi
Uo2tFZ6J1jyQP5c1K4rTpw3UNVne3ob7uCME+T1+ePeuM5Y/cpcCvAhJhO0rrlr0
dP3lOKrVdZg4qhtFAspC85ivcuxWNWnfTOBrgnvxCA1fmBX+MLNUEDsuu55LBNQT
5+WyrSchSlsczq+9EdomILhixUflDCShHs+Efvh7li6Pg56fwjEfj9DJYFhRvEvQ
@kurobeats
kurobeats / Drop requests by response code.js
Created October 31, 2019 22:27
Drop requests by response code script for Zap
function proxyRequest(msg) {
return true
}
function proxyResponse(msg) {
var code = msg.getResponseHeader().getStatusCode()
// You can add more codes here
if (code == 404 || code == 403 || code == 500 || code == 502) {
// Drop the response
return false
@kurobeats
kurobeats / stretch.sh
Created March 9, 2017 03:38 — forked from sickel/jessie.sh
debian 9 live build
#!/bin/bash
# WARNING: to use "--binary-images hdd", see this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773833
# WARNING: to get persistence encryption working, apply this fix: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767195
# Italian locale & keyboard, default boot with luks encrypted persistence
# lb config --distribution jessie --debian-installer live --binary-images iso-hybrid --archive-areas "main contrib non-free" --bootappend-live "boot=live persistence persistence-encryption=luks locales=it_IT.UTF-8 keyboard-layouts=it username=utente hostname=D8"
# lb config --distribution jessie --debian-installer live --binary-images iso-hybrid --archive-areas "main contrib non-free" --bootappend-live "boot=live persistence persistence-encryption=luks keyboard-layouts=it username=user hostname=D8"
# Default locale & norwegian keyboard, pxe boot