Skip to content

Instantly share code, notes, and snippets.

View suominen's full-sized avatar

Kimmo Suominen suominen

View GitHub Profile

Keybase proof

I hereby claim:

  • I am suominen on github.
  • I am kimmos (https://keybase.io/kimmos) on keybase.
  • I have a public key ASD5yFVCQl8FQTkmQDaGl5pepTA9ZfhXIRwB3oF5Wuzctwo

To claim this, I am signing this object:

@suominen
suominen / google-spf
Last active November 5, 2020 12:22
List Google's outbound SMTP server address blocks
#!/bin/sh
set -eu
listblocks()
{
local i
for i in $(dig +short "${1}" txt)
do
@suominen
suominen / screen.terminfo
Created May 4, 2020 21:10
Terminfo source for screen.xterm-256color
#
# For NetBSD 6:
# /usr/bin/tic -x -o ~/.terminfo.cdb screen.terminfo
# chmod go-w ~/.terminfo.cdb
#
# For ncurses 5:
# /usr/pkg/bin/tic -x screen.terminfo
# chmod -R go+rX ~/.terminfo
#
# With ncurses tic, only the first entry is needed as it will
@suominen
suominen / download-netbsd-iso
Last active December 31, 2022 14:13
Download NetBSD-daily ISO images
#!/bin/sh
# @(#)$KimmoSuominen: .cfg/home/dot.cron/download-netbsd-iso,v 1.10 2022/12/31 14:12:37 kim Exp $
#
# Copyright (c) 2020-2022 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
#!/bin/sh
#
# Copyright (c) 2020 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@suominen
suominen / 10-ssh-config
Created May 7, 2022 18:24
Harden sshd algorithms (EdgeOS 2)
#!/bin/sh
#
# Harden sshd algorithms
#
# EdgeOS 2:
# Copy this file to /config/scripts/post-config.d/10-ssh-config
# and make sure it is executable (chmod a+rx).
#
# Auditing ssh servers: https://github.com/jtesta/ssh-audit/
#
@suominen
suominen / 1password.yml
Last active October 20, 2023 14:22
Ansible playbook for installing 1Password on Debian
---
#
# Copyright (c) 2022 Kimmo Suominen
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@suominen
suominen / list-ssh-rsa-key-lengths
Created March 5, 2023 20:24
List host key information from ~/.ssh/known_hosts
#!/bin/sh
# @(#)$KimmoSuominen: .cfg/home/bin/share/list-ssh-rsa-key-lengths,v 1.3 2023/03/05 20:24:14 kim Exp $
#
# List host key information from ~/.ssh/known_hosts
#
# 20230225 Kimmo Suominen
#
#
# Copyright (c) 2023 Kimmo Suominen
@suominen
suominen / refresh-ssh-host-keys
Created March 5, 2023 20:24
Refresh a host's keys in ~/.ssh/known_hosts
#!/bin/sh
# @(#)$KimmoSuominen: .cfg/home/bin/share/refresh-ssh-host-keys,v 1.2 2023/03/05 20:24:01 kim Exp $
#
# Refresh a host's keys in ~/.ssh/known_hosts
#
# 20221122 Kimmo Suominen
#
#
# Copyright (c) 2022-2023 Kimmo Suominen
@suominen
suominen / fix-signed-ttl
Created April 25, 2023 20:31
Fix large TTLs in signed zones (BIND)
#!/bin/sh
#
# Fix signed zones with excessively high TTLs
#
# 20230425 Kimmo Suominen
#
set -eu
PATH=/bin:/usr/bin