Skip to content

Instantly share code, notes, and snippets.

View piger's full-sized avatar
💾
hanging out in busy town

Daniel Kertesz piger

💾
hanging out in busy town
View GitHub Profile
@piger
piger / tmux-cssh.zsh
Last active November 20, 2023 10:51
tmux-cssh
#!/usr/bin/env zsh
# tmux cluster ssh + knife support
# Daniel Kertesz <daniel@spatof.org>
#
# Add basic hosts completion to zsh by running:
# compdef _hosts tmux-cssh
set -e
autoload colors; colors
@piger
piger / sample.json
Last active July 3, 2016 11:14
Extract values from an arbitrary JSON data structure
{
"name": "\/init.scope\/system.slice\/docker-7f9ed89c7297f99669b6e79d9d8d404d19f160ca40b40f42896506fa7942786b.scope",
"spec": {
"creation_time": "2016-06-28T11:00:25.342124476Z",
"has_cpu": true,
"cpu": {
"limit": 2,
"max_limit": 0,
"period": 100000
},

Keybase proof

I hereby claim:

  • I am piger on github.
  • I am dkertesz (https://keybase.io/dkertesz) on keybase.
  • I have a public key whose fingerprint is 77B9 2F46 23D7 EA34 670C 3701 4410 4655 AD3A 0771

To claim this, I am signing this object:

# assign a prompt color by hashing the letters of the hostname
# idea copied from the irssi script 'nickcolor.pl'
# Daniel Kertesz <daniel@spatof.org>
autoload -U colors
colors
setopt prompt_subst
colnames=(
@piger
piger / gist:6753069
Created September 29, 2013 14:41
Lazy SSH Agent notification utility for OS X.
#!/bin/sh
# Lazy SSH Agent notification utility for OS X.
#
# Instead of asking the user for the confirmation to use a ssh key this script
# will just show a notification in Notification Center.
#
# Install as /usr/libexec/ssh-askpass
#
# Requires: terminal-notifier - https://github.com/alloy/terminal-notifier
@piger
piger / gist:6751638
Created September 29, 2013 11:26
zsh script for ssh key management
#!/usr/bin/env zsh
# portachiavi.zsh
# Dialog script for ssh key management.
# by: Daniel Kertesz <daniel@spatof.org> on 03-03-2008
SSHOPTS="-c"
: ${DIALOG=dialog}
setopt extendedglob
@piger
piger / moin_mass_reset.py
Created January 4, 2013 15:30
A simple script that can be used to hard-reset all the users' credentials in a MoinMoin installation with a random password.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Hard-reset MoinMoin passwords
A simple script that can be used to hard-reset all the users' credentials in a
MoinMoin installation with a random password.
02/01/13 - Daniel Kertesz <daniel@spatof.org>
"""