Skip to content

Instantly share code, notes, and snippets.

View Grunny's full-sized avatar

Daniel Grunwell Grunny

  • Fandom, Inc.
  • Australia
View GitHub Profile
@kenkouot
kenkouot / pre-commit
Last active August 29, 2015 13:59
Run JS code quality tools as precommit hook. Add in your repos ".git/hooks/" directory. Make sure file is named "precommit" (with no extension). After to add this into your hooks folder, make sure that the file has executable permissions.
#!/usr/bin/env python
import subprocess
import sys
import os.path, time
def get_modified_time(file):
return time.ctime(os.path.getmtime(file))
def run_js_tools(files_str):
"""Iterate though list and run code quality tools"""
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results