Skip to content

Instantly share code, notes, and snippets.

View hezi's full-sized avatar

Jorge (Hezi) Cohen hezi

View GitHub Profile
@hezi
hezi / 1.README.md
Last active August 29, 2015 14:24 — forked from varemenos/1.README.md

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
@hezi
hezi / app.js
Created January 14, 2013 13:39 — forked from pixelhandler/app.js
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@hezi
hezi / prefixer.py
Created May 20, 2012 10:24 — forked from drewmccormack/prefixer.py
Change the prefix of a Cocoa project
#!/usr/bin/env python
#---------
# Script to change the prefix of a framework
#---------
import os
import re
import string