This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Completely remove a file from a git repository history | |
# | |
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com> | |
# GPL licensed (see end of file) * Use at your own risk! | |
# | |
# Usage: | |
# git-forget-blob file_to_forget | |
# | |
# Notes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
use IPC::Open2; | |
use v5.14; | |
# Try to get the "format_bytes" function: | |
my $canFormat = eval { | |
require Number::Bytes::Human; | |
Number::Bytes::Human->import('format_bytes'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Based upon: https://help.ubuntu.com/12.04/installation-guide/example-preseed.txt | |
# | |
# localisation | |
d-i debian-installer/locale string en_US.utf8 | |
d-i console-keymaps-at/keymap select us | |
# networking | |
d-i netcfg/choose_interface select auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NSSDB=$HOME/.pki/nssdb | |
MODUTIL="/usr/bin/modutil -force -dbdir sql:$NSSDB" | |
CERTUTIL="/usr/bin/certutil -d sql:$NSSDB" | |
LIBFILE=/usr/local/AWP/lib/libOcsPKCS11Wrapper.so | |
if [ -n "`which apt-get`" ]; | |
then | |
sudo apt-get -y install libnss3-tools 2>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is a configurable version of an EventMachine syslogger | |
# It was build to replace https://github.com/melito/em-syslog | |
# | |
# You can instantiate many of them (no global variables) as | |
# well as configure the facility. It also quacks like a ruby | |
# logger so it can be interchanged with a ruby logger. | |
# | |
# Example: | |
# | |
# # 11 is the facility code for an FTP daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
import argparse | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import socketserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Shows a message while asserting like: | |
ok: [host] => { | |
"msg": "disk usage 4.2B of total 20.0GB (21.0%) (should exceed limit 90.0%)" | |
} | |
* Note this only looks at first mount point on current node | |
* Fails if disk is near-full | |
* Last step pushes to a push-based monitoring service, which will alert us if it doesn't get there after some time | |
* Need to setup a variable `disk_limit`, which is the max acceptable usage ratio, e.g. set it to 0.8 if you want to keep disks within 80% of max size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Figured out using: | |
# https://wiki.debian.org/DebianInstaller/Preseed/EditIso | |
# https://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/ | |
# https://gist.github.com/Aktau/5510437 | |
# https://www.cyberciti.biz/faq/how-to-extract-a-deb-file-without-opening-it-on-debian-or-ubuntu-linux/ | |
# | |
## Go home | |
cd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | |
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine | |
{ | |
"name": "Arenduskeskus", | |
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | |
"image": "mcr.microsoft.com/devcontainers/base:bookworm", | |
"features": { | |
"ghcr.io/devcontainers-contrib/features/ansible:2": {}, | |
"ghcr.io/wxw-matt/devcontainer-features/command_runner:0": {}, | |
"ghcr.io/joshuanianji/devcontainer-features/gcloud-cli-persistence:1": {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input=$1 | |
function reverseip () { | |
local IFS | |
IFS=. | |
set -- $1 | |
echo $4.$3.$2.$1 | |
} | |
reverseip $input |