Skip to content

Instantly share code, notes, and snippets.

@danieldownes
danieldownes / commitFilesByModificationDate.sh
Last active February 15, 2024 17:32
Commit file and use last modified date as author commit date
#!/bin/bash
# Get list of all files in all folders and subfolders
# ignore file and '.git' folder
# Sort by modification date, desc
find . -type f \( ! -iname "Thumbs.db" \) ! -path "./.git/*" -printf "%TY-%Tm-%TdT%TH:%TM:%.2TS%Tz$%p\n" |
sort -n |
@mildred
mildred / server.py
Created October 9, 2014 10:20
Python 3 http.server with PUT support
#!/usr/bin/env python
import argparse
import http.server
import os
class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def do_PUT(self):
path = self.translate_path(self.path)
if path.endswith('/'):