Skip to content

Instantly share code, notes, and snippets.

View arcticlinux's full-sized avatar

Michael Best arcticlinux

  • Arctic Linux
  • Edmonton, Alberta
View GitHub Profile
@jacobian
jacobian / check_postgres_replication.py
Created December 16, 2010 20:13
Nagios plugin to check PostgreSQL 9 streaming replication lag.
#!/usr/bin/env python
"""
Nagios plugin to check PostgreSQL 9 streaming replication lag.
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install).
MIT licensed:
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved.
@mhelff
mhelff / esp8266-basis.ino
Created March 30, 2016 19:12
Basic Arduino sketch for ESP8266 including WifiManager and OTA update
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <ArduinoOTA.h>
#include <WiFiManager.h>
void setup() {
Serial.begin(115200);
Serial.println("Booting");
WiFiManager wifiManager;
@mortn
mortn / systemd-wrapper.sh
Last active July 19, 2023 16:19
Wrapper script to aid and shorten systemd commands
# vim: tabstop=4 shiftwidth=4 fenc=utf-8 spell spelllang=en cc=120
#
# FILE: systemctl-shell-wrapper.bash
# DESCRIPTION: Wrapper script to aid and shorten systemd commands
# LICENSE: Apache 2.0
# CREDITS: http://github.com/yaffare/systemd-shell-wrapper
# MODIFIED BY: http://github.com/mortn/systemd-shell-wrapper
# INSTALLATION: wget -SO/etc/profile.d/systemd-wrapper.sh [Raw URL to this]
#
@arcticlinux
arcticlinux / pg_extract.sh
Created August 14, 2017 02:50 — forked from brock/pg_extract.sh
Extract all databases (or one by name) from a sql file created by pg_dumpall
#!/bin/bash
# extract all postgres databases from a sql file created by pg_dumpall
# this script outputs one .sql file for each database in the original .sql file
# unless you pass the name of a database in the dump
if [ $# -lt 1 ]
then
echo "Usage: $0 <postgresql sql dump> [dbname]" >&2
exit 1
fi
@filimonov
filimonov / replug_vbox_network.cmd
Last active August 9, 2020 18:08
"Replug" the cable of running VirtualBox VM (network freeze in guest VM after host windows hybernate - awake)
@echo off
set VboxManageEXE="%VBOX_MSI_INSTALL_PATH%\VBoxManage.exe"
set ListRunningVMS=%VboxManageEXE% list runningvms
for /f tokens^=2^,4^ delims^=^" %%p in ('%ListRunningVMS%') do (
echo "%%p"
%VBoxManageEXE% controlvm %%p setlinkstate1 off
%VBoxManageEXE% controlvm %%p setlinkstate1 on
)
@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@s3rj1k
s3rj1k / HowTo
Last active July 22, 2024 14:19
Ubuntu 20.04.3 AutoInstall
# For recent versions of Ubuntu:
- https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/
# Docs:
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53
# Download ISO Installer: