Skip to content

Instantly share code, notes, and snippets.

View kokosing's full-sized avatar
💤

Grzegorz Kokosiński kokosing

💤
View GitHub Profile
  1. Intellij Preferences > Live Templates > group Java
  2. Add a new one with
    • abbreviation rnn
    • Description requireNonNull
    • Template text java.util.Objects.requireNonNull($var$, "$var$ is null")
    • Applicable contexts: Java > Expression
    • check use static imports if possible
  • Edit variables button and there add var variable with variableOfType("Object") expression
#!/bin/sh
CURRENT=$1
git log --format='%<|(21)%cn %<|(39)%cd %<|(50)%h %s' --date=format-local:'%m-%d %H:%M:%S' $CURRENT.. | \
grep -vF '[maven-release-plugin]' | sort | \
awk '
{
name = substr($0, 1, 21)
if (name != current) {
@kokosing
kokosing / thread_dumps.sh
Created May 31, 2018 10:04
Parse thread dumps file
#!/bin/bash
set -exuo pipefail
# Usage <file with thread dumps> <output dir>
rm -rf $2
mkdir $2
cp $1 $2
@findepi
findepi / librus-plan-lekcji-przygotuj-do-wydruku.js
Last active August 31, 2023 15:49
Przygotuj Librusowy plan lekcji do wydruku na prawdę do wydruku
/*
* Class timetable as rendered in the Librus Synergia system https://synergia.librus.pl/
*/
(function($) {
// przerwy
$('.plan-lekcji tr.line0').remove()
// sobota, niedziela oraz nr lekcji z prawej strony
@findepi
findepi / sort-commits-for-github.sh
Last active August 6, 2021 20:53
sort commits for GitHub's sake
git rebase "$(git merge-base HEAD master)" -x 'git commit --amend -C HEAD --date="$(date -R)" && sleep 1.05'
@mculp
mculp / voices.txt
Created December 3, 2014 00:14
List of voices available by the `say` command on OS X
Agnes en_US # Isn't it nice to have a computer that will talk to you?
Albert en_US # I have a frog in my throat. No, I mean a real frog!
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.
Bahh en_US # Do not pull the wool over my eyes.
Bells en_US # Time flies when you are having fun.