Skip to content

Instantly share code, notes, and snippets.

@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)
@pad92
pad92 / iitc-plugin-ingressKML-exporter.user.js
Last active July 19, 2020 21:59
IITC plugin: Ingress KML Exporter
// ==UserScript==
// @id iitc-plugin-CSV@pad
// @name IITC plugin: Ingress KML Exporter
// @category Keys
// @version 1.0.20150105.03
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion
// @updateURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-ingressKML-exporter.user.js
// @downloadURL https://git.depad.fr/ingress-res/iitc-plugins/raw/master/pad-plugin-ingressKML-exporter.user.js
// @description Exports portals currently in view for use with Google Map ( KML Format ).
// @include https://www.ingress.com/intel*
@kdavidjames
kdavidjames / strip.php
Created April 15, 2014 06:17
Strip Heart Rate and Cadence Data From A Garmin .GPX File
<?php
// Check that we have a file
if((!empty($_FILES["file"])) && ($_FILES['file']['error'] == 0))
{
// Set some variables
$inputFile = $_FILES['file']['tmp_name'];
$outputFile = 'cleaned_'.$_FILES['file']['name'];
$nodesToStrip = $_POST['elements']; // array of child nodes to strip (hr|cad)