Skip to content

Instantly share code, notes, and snippets.

oofnikj

Block or report user

Report or block oofnikj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oofnikj
oofnikj / HostA.md
Created Jan 24, 2020
network config
View HostA.md

network config

HostA$ ip -d link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 addrgenmode eui64 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
    link/ether 94:c6:91:xx:xx:xx brd ff:ff:ff:ff:ff:ff promiscuity 1 
    bridge_slave state forwarding priority 32 cost 4 hairpin off guard off root_block off fastleave off learning on flood on addrgenmode eui64 
3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 100
    link/none  promiscuity 0 
View wififix.sh
#!/bin/bash
# Script to reset wifi on a Raspberry Pi Zero W
# Outputs a message to systemd-journal every time it resets
#
# nothing else seemed to work
#
# Run it with crontab every minute
@oofnikj
oofnikj / arch.md
Last active Jan 12, 2020
Arch linux install notes
View arch.md

Installing Arch

set up wireless networking

wpa_supplicant -B -i wlan0 -c <(wpa_passphrase *SSID *password*)
dhcpcd --ipv4only

partitioning

  • use cfdisk:
@oofnikj
oofnikj / get_cloud.sh
Last active Oct 14, 2019
Download and install latest google-cloud-sdk on Alpine / Debian / Ubuntu
View get_cloud.sh
#!/bin/sh -e
######
# Tested with various flavors of Alpine, Ubuntu and Debian. CentOS / RedHat not supported (yet).
# Use:
# wget -qO- https://gist.githubusercontent.com/oofnikj/7a2fb1e6b20b397775d882ecd8980159/raw | sh
######
SDK_DIR=/usr/local/lib
which apt && apt update && apt install -y wget jq python3 ca-certificates --no-install-recommends || true
@oofnikj
oofnikj / pg_manage.sh
Last active Oct 14, 2019
PostgreSQL dump / restore to Google Cloud Storage
View pg_manage.sh
#!/bin/bash
PGUSER=${PGUSER:-"postgres"}
CATALOG_BUCKET="normalized-catalog"
_get_dbs() {
psql -U $PGUSER -c "COPY (
SELECT datname FROM pg_database
WHERE datname NOT IN (
'postgres',
You can’t perform that action at this time.