Skip to content

Instantly share code, notes, and snippets.

View skurhse's full-sized avatar

Skurhse Rage ∅ skurhse

View GitHub Profile
#!/bin/bash
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:deluge-team/ppa
sudo apt-get update
sudo apt-get install deluged deluge-console
sudo adduser --system --gecos 'Deluge Service' --disabled-password --group --home /var/lib/deluge deluge
@skurhse
skurhse / setup_ssh.bash
Last active May 20, 2019 05:29
setup_ssh.bash
#!/bin/bash
read -s -p 'user:' user
adduser --gecos '' --ingroup sudo "$user"
install -o "$user" -g sudo -m 700 -d "/home/$user/.ssh"
install -o "$user" -g sudo -m 644 /dev/null "/home/$user/.ssh/authorized_keys2"
cat </root/.ssh/authorized_keys2 >>"/home/$user/.ssh/authorized_keys2"
rm /root/.ssh/authorized_keys2
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install ufw -y
sudo ufw allow OpenSSH #application name
sudo ufw allow 26656
sudo ufw enable
@skurhse
skurhse / webdev.md
Last active May 30, 2019 07:32
webdev track outline
#!/bin/bash
env 1>&1 |
grep '^PATH=' 1> >(cat) |
cut -c 6- |
awk '
{
old = ":"
new = "\n"
while ($0 ~ /:/) {
@skurhse
skurhse / declare-n.bash
Created May 15, 2021 04:08
Bash declare -n example
for e in 'key' 'tar' 'sig'
do
declare -n ref="$e"
wget --output-document "${ref[file]}" "${ref[url]}"
done
@skurhse
skurhse / gist:36d0a62033cf159fb10f0cb3abdc8d38
Created January 11, 2022 04:27
sudo apt-get install lld llvm llvm-dev
$ make spec
Using /usr/bin/llvm-config-13 [version= 13.0.0]
g++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/lib/llvm-13/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
CC="cc -fuse-ld=lld" CRYSTAL_CONFIG_BUILD_COMMIT="a3ee70ca0" CRYSTAL_CONFIG_PATH='$ORIGIN/../share/crystal/src' SOURCE_DATE_EPOCH="1641471908" ./bin/crystal build -D strict_multi_assign -Dwithout_interpreter --exclude-warnings spec/std --exclude-warnings spec/compiler --exclude-warnings spec/primitives -o .build/all_spec spec/all_spec.cr
ld.lld: error: cannot open _main.o: No such file or directory
ld.lld: error: cannot open S-lice40U-I-nt841.o: No such file or directory
ld.lld: error: cannot open P-ointer40U-I-nt841.o: No such file or directory
ld.lld: error: cannot open A-rgumentE-rror.o: No such file or directory
ld.lld: error: cannot open E-xception5858C-allS-tack.o: No such file or directory
ld.lld: error: cannot open A-rray40P-ointer40V-oid4141.o:
@skurhse
skurhse / test.bash
Created March 15, 2023 01:11
Reset line endings in the working directory when *enabling* core.autocrlf
#!/usr/bin/env bash
set -x
git --version
git config --global core.autocrlf false
git config --global core.eol crlf
cd /tmp
rm -rf lua-filters/
git clone https://github.com/pandoc/lua-filters