Skip to content

Instantly share code, notes, and snippets.

View pcothenet's full-sized avatar
🌋
We're hiring!

Paul Cothenet pcothenet

🌋
We're hiring!
View GitHub Profile
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@johan
johan / jsonish-to-json.pike
Created December 18, 2012 00:46
KissMetrics' idea of "json" isn't very canon. This hack mends json-illegal octal escapes.
#! /usr/bin/env pike
inherit Tools.Standalone.process_files;
string version = "1.0";
string description = "Replaces \\oct escapes with \\u00XX escapes.";
string usage = #"[options] <files>
jsonish-to-json is specifically suited to mending KissMetrics \"json\" dumps.
Available options: