Skip to content

Instantly share code, notes, and snippets.

@Lmd64-zz
Lmd64-zz / Liam Dunne
Created October 29, 2014 17:51
Snap Webcam And Caption It
mkdir -p ~/Pictures/BuildPhotos ; \
cd ~/Pictures/BuildPhotos ; \
photoPath="$(date +%y%m%d%H%M%S).png" ; \
resizedPhotoPath="resized-$(date +%y%m%d%H%M%S).png" ; \
/usr/local/bin/imagesnap -w 1 $photoPath ; \
topCaption='this is a test' ; \
topCaption="$(echo ${topCaption} | tr '[:lower:]' '[:upper:]')" ; \
bottomCaption='...which is resulting in a large amount of text that displays much text in this text' ; \
bottomCaption="$(echo ${bottomCaption} | tr '[:lower:]' '[:upper:]')" ; \
convert $photoPath -resize 320x320\> -size 320x -gravity south $resizedPhotoPath ; \
@Lmd64-zz
Lmd64-zz / git-history.sc
Created October 24, 2014 17:05
Pass in a git commit id to spit out all commit logs since that commit (inclusive)
LAST_COMMIT=$1
NOTES=`git log --pretty=$'tformat:%h %ad by %an %s%d' $LAST_COMMIT..origin/master --date=short`
if [[ -z "$NOTES" ]]; then
NOTES="No commits since last build"
fi
echo Commit notes for $appname version $VERSION gitversion $GIT_VERSION:
echo "$NOTES"

Keybase proof

I hereby claim:

  • I am Lmd64 on github.
  • I am liamo (https://keybase.io/liamo) on keybase.
  • I have a public key whose fingerprint is 8980 232A 8B26 5FB4 B377 8B1C 7867 556E 1C87 11B4

To claim this, I am signing this object:

@Lmd64-zz
Lmd64-zz / gist:6776820
Created October 1, 2013 10:56
AssertMacros: queueEntry temporary fix
#warning Temporary hack to remove the flood of assertmacro log messages.
typedef int (*PYStdWriter)(void *, const char *, int);
static PYStdWriter _oldStdWrite;
int __pyStderrWrite(void *inFD, const char *buffer, int size){
if ( strncmp(buffer, "AssertMacros:", 13) == 0 ) {
return 0;
}
return _oldStdWrite(inFD, buffer, size);
}