Skip to content

Instantly share code, notes, and snippets.

View arzzen's full-sized avatar
Focusing

arzzen

Focusing
  • ☁️
  • Ỏ̷͖͈̞̩͎̻̫̫̜͉
View GitHub Profile
@luismrsilva
luismrsilva / git-hours.sh
Last active January 19, 2017 18:54
Estimate git repository working hours by adding time between commits (for a given optional author)
#!/bin/bash
# Estimate repository working hours by adding time between commits.
# If diference between two commits is larger than THRESHOLD, PRECOMMIT_TIME is used instead.
# 2016-06-06 luismrsilva
# (c) 2016 by Luís Silva.
# Disclamer: use at your own risk.
@htp
htp / curl-websocket.sh
Last active February 8, 2025 05:24
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@vzaliva
vzaliva / ThinkLight
Created May 22, 2016 14:27
This script controll keyboard backlight on IBM ThinkPad X-series
#!/bin/bash
# Vadim Zaliva [email protected]
# based on https://gist.github.com/hadess/6847281
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@romuloceccon
romuloceccon / git-current-lines-by-author.sh
Last active April 30, 2018 09:58
git stats by author
git ls-files -z | xargs -0n1 git blame -e | perl -e 'while (<>) { s/^.*?<(.*?)>.*$/\1/; print $_; }' | sort -f | uniq -c | sort -n
@arzzen
arzzen / git_log_date_tag_csv.sh
Created March 15, 2016 11:14
git log date and tag csv
# output format (datetime;tag), example:
# 2016-03-07 14:54;%C;1.1.61
git log --tags --simplify-by-decoration --pretty="format:%ai%x08%x08%x08%x08%x08%x08%x08%x08%x08;%C;%d" | egrep "\(tag: [0-9]\.[0-9]+\.[0-9]+\)" | sed 's/ (tag: //' | sed 's/)//'
@sri
sri / hours_of_day_worked.sh
Last active January 28, 2017 11:56
What hours of the day have I worked
# From https://plus.google.com/+LinusTorvalds/posts/9EuaUEgarfu
git log --author=Sriram --pretty="%cd" | cut -d' ' -f4 | cut -d: -f1 | sort -n | uniq -c
@vasanthk
vasanthk / System Design.md
Last active April 19, 2025 20:36
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@eyecatchup
eyecatchup / git-commit-log-stats.md
Last active April 11, 2025 08:16
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@eltonjr
eltonjr / merges-count.sh
Created November 7, 2015 22:00
Counting the number of merges in a given repository
#!/bin/bash
AFTER="2015-11-1"
BEFORE=$TODAY
echo "Number of commits: " `git log --first-parent --after=$AFTER --before=$BEFORE --format="%s" | wc -l`
echo "Merges: " `git log --first-parent --after=$AFTER --before=$BEFORE --merges --format="%s" | wc -l`
echo "No-merges: " `git log --first-parent --after=$AFTER --before=$BEFORE --no-merges --format="%s" | wc -l`
@jgamblin
jgamblin / censys.py
Created November 7, 2015 04:31
A Python Script To Search Cynsys.io
#!/usr/bin/env python
#-*- coding: utf-8 -*-
from termcolor import colored
import argparse
import json
import requests
import codecs
import locale
import os