Skip to content

Instantly share code, notes, and snippets.

@varemenos
varemenos / 1.README.md
Last active April 21, 2024 23:21
Git log in JSON format

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
@jaceklaskowski
jaceklaskowski / deployment-tool-ansible-puppet-chef-salt.md
Last active January 3, 2024 22:12
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution

@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

#!/bin/zsh
#
# Highlight a given file and copy it as RTF.
#
# Simon Olofsson <simon@olofsson.de>
#
set -o errexit
set -o nounset
@drawks
drawks / graphite
Created February 14, 2012 21:24
Graphite on uwsgi/nginx
#This is the "site config" for nginx
upstream django {
# Distribute requests to servers based on client IP. This keeps load
# balancing fair but consistent per-client. In this instance we're
# only using one uWGSI worker anyway.
ip_hash;
server unix:/tmp/uwsgi.sock;
}
server {
@rbscott
rbscott / elasticsearch.conf
Created June 28, 2011 19:46
upstart job for elastic search
# ElasticSearch Service
description "ElasticSearch"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
@ashee
ashee / kvm guest - vnc over ssh tunnel.sh
Created April 14, 2011 18:06
How to connect vnc viewer to a kvm guest over ssh tunnel
amitava@bonjovi:~$ sudo virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # start latticegrid-demo
Domain latticegrid-demo started
virsh # list