Skip to content

Instantly share code, notes, and snippets.

View ghisguth's full-sized avatar

Alexander Fedora ghisguth

  • Microsoft
  • Issaquah, WA
View GitHub Profile
#!/usr/bin/env sh
lastversion=`git tag -l | egrep "^v[0-9]+\.[0-9]+\.[0-9]+" | cut -d"-" -f 1 | sed "s/^v//g" | sort | tail -n 1`
if [ -e $lastversion ]
then
lastversion="0.0.0"
else
tmpmajor=`git tag -l | egrep "^v[0-9]+\.[0-9]+\.[0-9]+" | sed "s/^v//g" | cut -d"." -f1 | sort -n | tail -n 1`
tmpminor=`git tag -l | egrep "^v$tmpmajor\.[0-9]+\.[0-9]+" | sed "s/^v//g" | cut -d"." -f2 | sort -n | tail -n 1`
tmpbuild=`git tag -l | egrep "^v$tmpmajor\.$tmpminor\.[0-9]+" | sed "s/^v//g" | cut -d"." -f3 | sort -n | tail -n 1`
" .vimrc
set nocompatible
set showcmd
set incsearch
set hlsearch
set novisualbell
set t_vb=
set mouse=a
set mousemodel=popup
set mousehide
signed long my_signed_htonl(signed long value)
{
unsigned long l = *reinterpret_cast<unsigned long *>(&value);
l = htonl(l);
return *reinterpret_cast<signed long *>(&l);
}
signed long my_signed_ntohl(signed long value)
{
unsigned long l = *reinterpret_cast<unsigned long *>(&value);