Skip to content

Instantly share code, notes, and snippets.

@DanieleSalatti
DanieleSalatti / pre-commit
Created September 23, 2022 13:45
pre-commit git hook to check for leftover console.log(s)
#!/bin/sh
exec 1>&2
exec < /dev/tty
consoleregexp='^\+.*console\.log('
if test $(git diff --cached -U0 | grep $consoleregexp | wc -l) != 0
then
exec git diff --cached | grep -ne $consoleregexp
read -p "It looks like you have left some console.log statements in your code. Are you sure want to continue? (y/n)" yn
@DanieleSalatti
DanieleSalatti / private_fork.md
Last active November 29, 2020 00:54 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The correct way of creating a private frok by duplicating the repo is documented here.

The commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)
    git clone --bare [email protected]:usi-systems/easytrace.git