Skip to content

Instantly share code, notes, and snippets.

@dnozay
dnozay / My Exiftool Cheatsheet.md
Last active November 12, 2023 15:48 — forked from rjames86/My Exiftool Cheatsheet.md
Cheatsheet for image / video metadata manipulation.

Cheatsheet for image / video metadata manipulation.

Last updated 2019-07-24

Disclaimer

until more specific license...

THE CONTENT BELOW IS PROVIDED "AS-IS",
WE DISCLAIM LIABILITY FOR ALL USES TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW.
@dnozay
dnozay / LICENSE
Created July 2, 2019 17:56
This is a simple script to look at projects configuration in SemaphoreCI 1.0.
Copyright (c) 2019 Damien Nozay
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
@dnozay
dnozay / go-test2json-junit.py
Created June 4, 2019 22:17
transform test2json output to junit
#!/usr/bin/env python3
from collections import defaultdict
from datetime import datetime
import json
import fileinput
import os
import pprint
from xml.dom.minidom import Document
// LogNow logs the information right away.
// This is particularly useful for debugging information in case of a
// panic, or because (*testing.T) Log() output is buffered and rolled
// up with its parent test output.
func LogNow(t *testing.T, format string, args ...interface{}) {
_, file, line, ok := runtime.Caller(1)
if ok {
if file != "" {
// Truncate file name
if index := strings.LastIndex(file, "/"); index >= 0 {
@dnozay
dnozay / Dockerfile-tox
Created April 8, 2019 05:37
random stuff with docker-compose, mysql, python, tox and pip wheels
# syntax=docker/dockerfile:experimental
FROM python:3.7
COPY requirements.txt .
COPY requirements-tox.txt .
RUN --mount=type=secret,id=pip,dst=/root/.pip/pip.conf \
pip download --destination-directory /root/.pip/cache \
-r requirements.txt \
-r requirements-tox.txt \
tox wheel
@dnozay
dnozay / LICENSE
Created December 19, 2017 20:07
Datetime utilities extracted from Django code as a single module.
Copyright (c) Django Software Foundation and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
@dnozay
dnozay / LICENSE
Last active October 24, 2017 16:50
min-heap, max-heap, heapsort
Copyright 2017 Damien Nozay
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERR
@dnozay
dnozay / process_info.py
Created June 12, 2017 20:49
psutil: list process based on ppid
# Rationale: find all subprocesses of a certain command and do something similar to os.killpg
# We need the process ids to wait and be more aggressive if they don't terminate in due time.
import psutil
def print_info(process):
with process.oneshot():
print 'pid={0}, ppid={1}, cmd={2}'.format(process.pid, process.ppid(), str(process.cmdline()))
def process_info(pid):
@dnozay
dnozay / init.gradle
Created February 9, 2017 19:36
add markers to gradle output so it's easy to extract the block for a failed task
/*
add markers to gradle output so it's easy to extract the block for a failed task,
e.g. with a stream editor like sed.
*/
useLogger(new CustomEventLogger())
class CustomEventLogger implements TaskExecutionListener {
public void beforeExecute(Task task) {
println "## Start-task: $task.name"
@dnozay
dnozay / gift-shuffle.py
Created November 18, 2016 20:47
quick tool for making a christmas gifting list.
#!/usr/bin/python
# e.g. python gift-shuffle.py linda dad adam misty laura damien bryan joelle
# dad == gives present to ==> damien
# damien == gives present to ==> joelle
# joelle == gives present to ==> linda
# linda == gives present to ==> adam
# adam == gives present to ==> laura
# laura == gives present to ==> bryan