Skip to content

Instantly share code, notes, and snippets.

View crummy's full-sized avatar

Malcolm Crum crummy

View GitHub Profile
@sephiroth74
sephiroth74 / git pretty stat
Last active July 29, 2024 14:22
Show lines added/deleted and total commits per author in a period of time on all branches
git log --all --numstat --pretty="%H" --author="author" --since=1.year | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("lines added: +%d\nlines deleted: -%d\ntotal commits: %d\n", plus, minus, total)}'
@alekswn
alekswn / adb_rotate.sh
Created January 22, 2016 23:41
Android: screen rotation from ADB
#!/bin/sh
if [ -z $1 ]
then
echo "Usage: $0 { p | l | a }. p - portrait, l - landscape, a - auto"
elif [[ $1 == a* ]]
then
echo "Turning on automatic rotation"
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:1
else
@sandeepraju
sandeepraju / ttfb.sh
Created July 20, 2016 21:17
curl command to check the time to first byte
#!/bin/bash
# file: ttfb.sh
# curl command to check the time to first byte
# ** usage **
# 1. ./ttfb.sh "https://google.com"
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com"
curl -o /dev/null \
-H 'Cache-Control: no-cache' \
-s \
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active July 29, 2024 19:50
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@tcg
tcg / how-i-configure-my-logitech-g502-mouse-to-make-me-more-productive.md
Created August 29, 2017 03:09
How I configure my Logitech G502 mouse to make me more productive

How I configure my Logitech G502 mouse to make me more productive

I use a "gaming mouse" as my current favorite every-day computer mouse, when I'm not just using the trackpad.

If you're not familiar with it, it's a great computer mouse that has some extra buttons that can be arbitrarily assigned key combos, macros, and various functions.

Recently, I decided to tweak some settings for every day desktop/work use, and I've been quite pleased. Here's a couple things I did:

Middle scroll wheel: left/right tilt