Skip to content

Instantly share code, notes, and snippets.

View choffmeister's full-sized avatar

Christian Hoffmeister choffmeister

View GitHub Profile

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@4ndrej
4ndrej / SSLPoke.java
Last active January 3, 2024 09:50
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
@atimb
atimb / find-empty-dir-in-svn.rb
Last active May 10, 2018 22:52 — forked from mfn/find-empty-dir-in-svn.rb
Ruby script to find top-level empty directories in a working SVN directory tree (forked and fixed because original script was not properly working for more complicated directory structure)
##
# Ruby script to find top-level empty directories in a working SVN directory tree
#
# A directory is considered empty, if there are zero files reachable through this directory (excluding
# files under .svn directories). That means that a directory containing other empty directories is
# also empty (recursively). The algorithm will consolidate the output so that it only contains
# top-level empty directories, but not their sub-directories.
#
# The output of this script can be used, for example to remove non-used parts of a SVN repository:
# ruby empty_dirs.rb | xargs svn del
@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" > index.html
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@ohac
ohac / hmacsha1.scala
Created February 22, 2010 09:00
HMAC-SHA1 for Scala
import javax.crypto.spec.SecretKeySpec
import javax.crypto.Mac
object A {
def main(args: Array[String]): Unit = {
val secret = new SecretKeySpec("the_secret".getBytes, "HmacSHA1")
val mac = Mac.getInstance("HmacSHA1")
mac.init(secret)
val result: Array[Byte] = mac.doFinal("foo".getBytes)
println(result.map(_.toString).mkString(","))