My oneliners
Useful oneliners, no particular categories or order
Powershell allow local scripts
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Useful oneliners, no particular categories or order
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
/etc/initramfs-tools/modules
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax: module_name [args ...]
#
If like me you bought a Datto Xeon-D Gigabyte motherboard here are some infos about them.
You can update at least the ipmi with stock gigabyte firmware
Also mine came with a BIOS password, I found this snippet online and indeed this was it:
By the way, if anyone bought one and needs the BIOS password, from my experience there's a 99.9% chance of it being either "R@str" or "Northern" or "NorthernLight$" (no quotes, caps as shown)
#!/usr/bin/env bash | |
# rmate | |
# Copyright (C) 2011-2018 by Harald Lapp <harald@octris.org> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
#!/bin/bash | |
# unaquired feed | |
UNAQRSS='http://www.myepisodes.com/rss.php?feed=unacquired&showignored=0&uid=YOURUID&pwdmd5=YOURPWD' | |
if [ "$1" = "unwatched" ]; then | |
# unwatched feed | |
UNWARSS='http://www.myepisodes.com/rss.php?feed=unwatched&showignored=0&uid=icebox1701&pwdmd5=dcd899992143485371326b141e2db38e' | |
UNW=$(curl -s $UNWARSS | grep '<title>\[' | sed -e 's/<[^>]\+>//g' -e 's/^[ \t]*//' -e 's/\]\[/-/g' -e 's/\[\ //g' -e 's/\ \]//g' -e 's/$/<br>/') | |
UNWNO=$(echo "$UNW"| sed '/^\s*$/d'|wc -l) | |
if [ $((UNWNO)) -gt 0 ]; then |
$darkString = @' | |
document.addEventListener('DOMContentLoaded', function() { | |
$.ajax({ | |
url: 'https://cdn.jsdelivr.net/gh/laCour/slack-night-mode/css/raw/black.css', | |
success: function(css) { | |
let overrides = ` | |
code { background-color: #535353; color: #85c5ff; } /* Change color: to whatever font color you want */ | |
.c-mrkdwn__pre, .c-mrkdwn__quote { background: #535353 !important; background-color: #535353 !important; } | |
.p-threads_footer__input .p-message_input_field { background: #000 } | |
` |
This is what I tell people to do, who ask me "how do I learn to be a Linux sysadmin?"
Download FreeBSD 11.1 VMDK and create a VM with it as HDD.
Get FreeBSD source tree for your exact FreeBSD version and uncompress it to /usr/src:
fetch -o /tmp ftp://ftp.freebsd.org/pub/`uname -s`/releases/`uname -m`/`uname -r | cut -d'-' -f1,2`/src.txz
tar -C / -xvf /tmp/src.txz
Download latest Realtek network driver.
#!/bin/bash | |
APP_TOKEN="" | |
USER_KEY="" | |
function usage { | |
echo "Usage: pu.sh --title "Title" --message "Cool message" [ --file catmeme.jpg ]" | |
echo | |
echo "Options:" | |
echo "-h, --help" |
amd64
and arm
) Kubernetes cluster setupThe official guide for setting up Kubernetes using kubeadm
works well for clusters of one architecture. But, the main problem that crops up is the kube-proxy
image defaults to the architecture of the master node (where kubeadm
was run in the first place).
This causes issues when arm
nodes join the cluster, as they will try to execute the amd64
version of kube-proxy
, and will fail.
It turns out that the pod running kube-proxy
is configured using a DaemonSet. With a small edit to the configuration, it's possible to create multiple DaemonSets—one for each architecture.
Follow the instructions at https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ for setting up the master node. I've been using Weave Net as the network plugin; it see