Skip to content

Instantly share code, notes, and snippets.

View SoboLAN's full-sized avatar

Radu Murzea SoboLAN

View GitHub Profile
#!/bin/sh
for k in `git branch -r | perl -pe s\/\^\.\.\/\/`; do echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k -- | head -n 1`\\t$k; done | sort -r
git log --tags --simplify-by-decoration --pretty="format:%ai %d"
@SoboLAN
SoboLAN / nr.days.in.month.php
Created March 30, 2017 08:47
Get number of days in a month
<?php
function isLeapYear($year)
{
return $year % 100 == 0
? $year % 400 == 0
: $year % 4 == 0;
}
function getMonthDayCount($year, $month)