Skip to content

Instantly share code, notes, and snippets.

View lanefu's full-sized avatar
🏅
outstanding achievement in the field of excellence

lanefu

🏅
outstanding achievement in the field of excellence
View GitHub Profile
@lanefu
lanefu / emergency_team_building.md
Last active October 20, 2023 16:14
Emergency Team building Exercises

Emergency Team Building Exercises

Draw the short straw? Getting paid to kill the time with strangers? Need to heal some relationships to get some work done?

Maybe you need a team building exercise.

Paper Airplanes

remote and on-prem friendly

@lanefu
lanefu / add user public key
Last active July 23, 2023 04:38
another ssh public key script
#!/bin/bash
NEW_USER="someuser"
USER_PUBLIC_KEY="some public key"
mkdir -p /home/${NEW_USER}/.ssh
echo "${NEW_USER_PUBLIC_KEY}" >> /home/${NEW_USER}/authorized_keys
chown -R ${NEW_USER} /home/${NEW_USER}/.ssh
chmod 700 /home/${NEW_USER}/.ssh/
@lanefu
lanefu / install_lvim.mac.sh
Last active August 2, 2023 20:46
Isolated LazyVim install for debian
#!/bin/bash
brew install xz pyenv ninja cmake gettext curl npm wget ripgrep lazygit wget
git --single-branch --branch stable clone https://github.com/neovim/neovim
pushd neovim
git checkout stable
export LDFLAGS="-L/opt/homebrew/opt/curl/lib"
export CPPFLAGS="-I/opt/homebrew/opt/curl/include"
@lanefu
lanefu / simple-git-over-ssh.md
Created November 10, 2022 13:37
simple self-hosted git over plain ssh

Sometimes you just need an easy way to have a private git repo. Put it on your favorite VPS, SBC, linux box, etc

creates a folder and git repo via relative path of user directory

GIT_REMOTE_DIR=GIT/hosted/example
GIT_REMOTE_HOST=myhost.example.com
ssh ${GIT_REMOTE_HOST} "mkdir -p ${GIT_REMOTE_DIR} && git init --bare ${GIT_REMOTE_DIR}"
@lanefu
lanefu / WTFastly.sh
Created March 13, 2021 14:25
armbian fastly debug
!/usr/bin/env bash
# Examples:
# linx hello.txt # paste file (name/ext will be set).
# echo Hello world. | linx # read from STDIN (won't set name/ext).
# linx -n 1 self_destruct.txt # paste will be deleted after one read.
# linx -i ID hello.txt # replace ID, if you have permission.
# linx -d ID
fastly_headers() {
curl -I -X GET https://mirrors.fossho.st/armbian/apt/
@lanefu
lanefu / graphana.hcl
Created January 6, 2021 15:09
grafana nomad example
job "grafana" {
datacenters = ["example_datacenter"]
type = "service"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
@lanefu
lanefu / sd-seq-write.md
Last active January 1, 2021 21:58
SDcard sequentional write testing

sequentional write tests

hardware

  • pinebook pro
  • usb 3.0 ugreen sdcard reader

benchmark

  • write a random arnbian image approx 1.4G command time dd of=/dev/sdb if=Armbian_21.02.0-trunk-AR-512_Orangepioneplus_focal_dev_5.10.0.img bs=1M conf=fsync status=progress

tests

@lanefu
lanefu / btrfs_balance.sh
Created August 6, 2020 15:06
btrfs progressive balance
#!/bin/bash
diskpath=/
echo before
btrfs filesystem usage ${diskpath}
for i in 0 5 10 15 20 25 30 40 50 60 70 80 90 100
do
echo "${0}: Running with ${i}%"
btrfs filesystem usage ${diskpath}
@lanefu
lanefu / devopsythings.md
Created July 28, 2020 18:37
List of Devopys Things I like
@lanefu
lanefu / mirror candidates.md
Last active July 28, 2020 13:56
armbian mirror candidates

we need mirrors.

can they replcate rsync.armbian.com::apt - 150G and rsync.armbian.com::dl 760GB-1TB ?

North America Mirror candidates

http://mirrors.gigenet.com    

This hardware and bandwidth for this mirror is donated by GigeNET as a service to the open-source community. If you are interested in having us mirror your open-source project, please reach out to mirrors@gigenet.com.

http://plug-mirror.rcac.purdue.edu/info.html

The mirror is hosted on an Isilon box (dual Xeon L5410s, 28GB ram, 111TB disk [71TB usable], 10G network, running Debian) generously donated by Purdue's research computing group.