Skip to content

Instantly share code, notes, and snippets.

View nexus166's full-sized avatar
🌪️
🐧

nexus166

🌪️
🐧
  • Earth
View GitHub Profile
#!/bin/sh
printf '%s\n' "$(hexdump -n6 -e '/1 ":%02X"' /dev/urandom | sed s/^://g)"
@nexus166
nexus166 / fastats.sh
Created August 8, 2019 18:41
fasta file processing with bash
#!/usr/bin/env bash
set +xv -eo pipefail
# function to un-truncate sequences (60 char long) into single lines from (multi)fasta input
_fasta_read() { sed -e 's/\(^>.*$\)/#\1#/' ${1} | tr -d "\r" | tr -d "\n" | sed -e 's/$/#/' | tr "#" "\n" | sed -e '/^$/d'; }
# function to process sequences and output results
_process_seq() {
# first arg for function is id
@nexus166
nexus166 / 00_bonding_init
Created August 21, 2019 11:29
initramfs bonding
#!/bin/sh -e
PREREQS=""
case $1 in
prereqs) echo "${PREREQS}"; exit 0;;
esac
BOND_MASTER=${BOND_MASTER:-bond0}
version: 0.1
log:
level: info
formatter: text
fields:
service: registry
environment: production
loglevel: info
storage:
delete:
#!/usr/bin/env bash
DECODE=
while getopts ":d" opt; do
case "${opt}" in
d) DECODE=1;;
esac
done
if [[ ! -z "$DECODE" ]]; then
@nexus166
nexus166 / etc-network-interfaces
Last active April 10, 2020 12:19
rpi /etc/network/interfaces
auto lo
iface lo inet loopback
# dns-nameservers 1.1.1.1 1.0.0.1
iface lo inet6 loopback
# dns-nameservers 2606:4700:4700::1111 2606:4700:4700::1001
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
metric 10
#!/usr/bin/env bash
set -xeo pipefail
mem_clean() {
for i in {1..3}; do
sync
echo $i > /proc/sys/vm/drop_caches
done
}
--- libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018/04/25 07:39:32 259630
+++ libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018/05/24 20:07:25 260687
@@ -138,7 +138,6 @@
# include <sys/procfs.h>
#endif
#include <sys/user.h>
-#include <sys/ustat.h>
#include <linux/cyclades.h>
#include <linux/if_eql.h>
#include <linux/if_plip.h>
@nexus166
nexus166 / RSA.sh
Last active October 1, 2019 20:43
#!/usr/bin/env bash
set +xv -eo pipefail
command -v openssl 1>/dev/null
## RUNTIME
trap 'rm -frv ${_KEY_F}*' ERR
# KEY FILE
@nexus166
nexus166 / file.json
Created October 4, 2019 15:22
vault configs
{
"backend": {
"file": {
"path": "/vault"
}
},
"listener": {
"tcp": {
"address": "0.0.0.0:8200",
"tls_disable": "0",