Skip to content

Instantly share code, notes, and snippets.

View Blucknote's full-sized avatar

Evgeniy Blucknote

  • Russia
  • 20:42 (UTC +03:00)
View GitHub Profile
@Blucknote
Blucknote / gist:813ec1fdc579f45535e8ec12bbd0cc62
Last active June 26, 2020 14:25 — forked from hannu/gist:4604611
Filter your own commit messages from git log and group by day. (Modified from http://stackoverflow.com/questions/2976665/git-changelog-day-by-day)
#!/bin/bash
AUTHOR=$(git config user.name)
DATE=$(date +%F)
git log --format="%cd" --date=short --no-merges --author="$AUTHOR" --all --after="2020-06-14" --until="2020-06-20" | sort -u -r | while read DATE ; do
if [ $NEXT != "" ]
then
echo
echo [$NEXT]
fi
GIT_PAGER=cat git log --no-merges --format=" %s" --since=$DATE --until=$NEXT --author="$AUTHOR" --all
@Blucknote
Blucknote / hb_all_book_bundle_dl.js
Last active January 12, 2020 15:54 — forked from kfatehi/hb_all_books_dl.js
Humble bundle book bundles - download all books per bundle at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
this fork downloads all formats and does so without using jquery (since that didnt work for me)
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
type “about:plugins” in the address bar and disable chrome's pdf viewer
*/
var pattern = /(MOBI|EPUB|PDF)$/i;
@Blucknote
Blucknote / plural.py
Last active August 26, 2019 12:33 — forked from CubexX/plural.py
Python abstract plural
def pluralize(n, lst):
if n % 10 == 1 and n % 100 != 11:
p = 0
elif 2 <= n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20):
p = 1
else:
p = 2
return '{} {}'.format(str(n), lst[p])