Skip to content

Instantly share code, notes, and snippets.

View eyarz's full-sized avatar
🐐

Eyar Zilberman eyarz

🐐
View GitHub Profile
@eyarz
eyarz / bad-practice-example.json
Last active September 12, 2019 09:02
How not to define packages in package.json
{
"name": "GitHub Octocat Generator",
"description": "Generate 1337 Octocats",
"repository": {
"type": "git",
"url": "https://github.com/datree/io.git"
},
"dependencies": {
"async": "latest",
"bower": "latest",
const fs = require('fs')
const path = require('path')
try {
fs.unlinkSync(path.join(__dirname, 'local.json'))
} catch (err) {}
const AWS = require('aws-sdk')
AWS.config.update({ region: 'us-east-1' })
const ssm = new AWS.SSM()
var serviceName = require('../package.json').name
@eyarz
eyarz / commit-msg-hook.py
Last active December 15, 2021 17:57
Git commit-msg hook to verify commit message convention => https://datree.io/blog/git-commit-message-conventions-for-readable-git-log/
#!/usr/bin/env python
"""
Git commit hook:
.git/hooks/commit-msg
Check commit message according to guidelines
"""
import sys
import re