Skip to content

Instantly share code, notes, and snippets.

View jpadhye's full-sized avatar

Jaideep Padhye jpadhye

View GitHub Profile
@ndevenish
ndevenish / setup.py
Created June 22, 2016 16:16
Replacement setup.py for py3exiv2, that allows building on OSX
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import os
import glob
import subprocess
from setuptools import setup, find_packages, Extension
@Faheetah
Faheetah / Jenkinsfile.groovy
Last active October 26, 2024 16:38
Jenkinsfile idiosynchrasies with escaping and quotes
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
@cgoldberg
cgoldberg / img_exif_date_fixer.py
Last active June 7, 2021 07:10
Python - Fix Photo Exif Metadata
#!/usr/bin/env python
#
# gexiv2 image Exif date fixer.
# Corey Goldberg, 2014
"""Recursively scan a directory tree, fixing dates
on all jpg/png image files.
Each file's Exif metadata and atime/mtime are all