Skip to content

Instantly share code, notes, and snippets.

@gortok
gortok / pre-receive.py
Last active June 8, 2020 12:39
Python Pre Receive hook for checking commit messages
#!/bin/python
import sys
import re
import subprocess
#Format: "oldref newref branch"
line = sys.stdin.read()
(base, commit, ref) = line.strip().split()
new_branch_push = re.match(r'[^1-9]+', base)
@Saul-Mirone
Saul-Mirone / Cookie.js
Last active February 7, 2017 05:56
A Node.js cookie module, a middleware based on express or my core.js module
import com.google.common.base.CaseFormat
import com.intellij.database.model.DasObject
import com.intellij.database.model.DasTable
import com.intellij.database.model.ObjectKind
import com.intellij.database.util.Case
import com.intellij.database.util.DasUtil
/**
* modification of origin script :
* - add comment support (if you are non native English user, it is very important)