Skip to content

Instantly share code, notes, and snippets.

@akomakom
akomakom / russian-phonetic-like-linux.klc
Last active April 16, 2017 20:36 — forked from max630/gist:2872656
Russian phonetic layout for MS Keyboard Layout Creator 1.4 (Windows 7). Layout is the same as the standard Russian-Phonetic keyboard in Ubuntu. (Ч on +, Ю on `, Э on \). Layout Creator 1.4 would not load https://gist.github.com/max630/2872656, so I rebuilt it from scratch.
KBD RU_P "Russian - Phonetic Akom"
COPYRIGHT "(c) 2017 Akom"
COMPANY "Akom"
LOCALENAME "ru-RU"
LOCALEID "00000419"
@akomakom
akomakom / find-nexus-local-repos.rb
Last active December 19, 2016 22:58
Nexus 2.x backup helper that finds local repositories and produces an rsync include file or runs a command for each one. See comments and -h for usage.
#!/usr/bin/env ruby
#
# helper for backing up nexus 2 repositories that matter
# Run with -h for help
#
# Finds Nexus repositories that are not group, shadow or proxy
# and either produces an rsync file or runs an arbitrary command for each directory
#
# Examples (you may need to specify -n for all of these examples to specify your nexus installation)
@akomakom
akomakom / README.md
Last active January 15, 2019 01:03
Bash completion file for tmux using a simple clusters file, autocompletes list names and starts ssh to all matches in a single window with synchronized keyboard input.

What this is

The two bash completion scripts provide two bash completion prefixes:

  • tm or tmuxmulti ("Connect in a split terminal to all hosts in the matched list(s)")
  • tmh or tmuxmultihost ("Tmux Multi by Host", same but for matching against the hostnames rather than list names)

The system-of-record for both of these is a ~/.tmux_clusters file (see below for format).

Installation

Option 1 (static)

@akomakom
akomakom / jenkins-groovy-system-script.groovy
Last active October 21, 2022 17:32 — forked from rb2k/gist:8372402
A jenkins script to clean up workspaces on slaves. On all slaves with less than X free GB, this script removes /slaves/workspace/* if slave is idle. If not idle, it removes /full/job/workspace/path for each job that isn't currently running. There are two versions: a "System Groovy Script" and a Jenkinsfile (Pipeline script)
/**
Jenkins System Groovy script to clean up workspaces on all slaves.
Check if a slave has < X GB of free space, perform cleanup if it's less.
If slave is idle, wipe out everything in the workspace directory as well any extra configured directories.
If slave is busy, wipe out individual job workspace directories for jobs that aren't running.
Either way, remove custom workspaces also if they aren't in use.
**/
import hudson.model.*;