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 / 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 <[email protected]>
"""
@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 <[email protected]> on 03-03-2008
SSHOPTS="-c"
: ${DIALOG=dialog}
setopt extendedglob
@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
# assign a prompt color by hashing the letters of the hostname
# idea copied from the irssi script 'nickcolor.pl'
# Daniel Kertesz <[email protected]>
autoload -U colors
colors
setopt prompt_subst
colnames=(

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:

@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
},
@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 <[email protected]>
#
# Add basic hosts completion to zsh by running:
# compdef _hosts tmux-cssh
set -e
autoload colors; colors