Tuesday, April 24, 2012

Flexible Ethics: What is Inspiration

So K took the initiative to inquire from a blog on Al-Zanki's Social Media Boss's statement which they boasted on their site. The guys from the Social Media gang replied some days later and I'm surprised that they replied in the first place! But rest assured, both their reply & Al-Zanki's reply have been nothing but a boat-load of egotistical idiocy.



So at first, The Social Media Boss gang said that copying Mashable's Code of Ethics' page is called Inspiration!!!! They were inspired by Mashable's "structure" (whatever that means), so they copied their Code of Ethics page. Not only that, Khalid comments later that it has been removed, and he slaps in a smiley!

Wow! I didn't know that plagiarism can be fixed by deleting the content, pretend that it never happened AND add a smiley to it! Plagiarists rejoice!

The amount of epic fail isn't enough to describe my feelings, not only towards this fraud who calls himself a social media expert, but also my feelings towards those who pay him to spew his "inspired" thoughts and copied book. Sorry, I meant "his authentic book."

Monday, April 23, 2012

Stack Overflow Worldwide Meetup: Kuwait

The 2nd annual Stack Overflow Worldwide Meetup is on next Saturday and Kuwait is participating thanks to Bashar who registered for Kuwait in the event.

This year however, StackExchange is setting the meetup for all sorts of professions related to IT, not just coders: Coders, DBAs, Sys Admins, Network Admins, Security Auditors, Web Masters, Cryptography, Game Development, and the list goes on.

The presentations/talks are 5 minutes long to keep room for everyone to pitch in. Also, according to the translation of Ahmad's Arabic page, there may be a chance for romance (?!?!?).

The event will be held at KITS on Saturday April 28th from 1400 till 2100 (2-9 PM).

Sunday, April 22, 2012

Sorting Docx Files By Date in Shell

A friend of mine asked me to recover data from a formatted disk and because the disk is formatted, there's no way to know the file name, directory or some other attributes that are saved in the Master File Table (MFT) of the NTFS filesystem.

Docx files are basically a collection of XML files that are zipped together. Knowing this fact, all I had to do is write a script that unzips the control file that has the time stamps, create the directories based on year & month (yyyy-mm), then move the file inside it.

One required package to be installed is the "xmlstarlet" package. Use your package manager to install it before running the script.

You don't need to modify this script. Just save it, chmod +x the script then use it with "find" like the example. One thing, if you intend to traverse subdirectories, then remove the maxdepth option and make sure your destination directory (DocxSorted) is located in an upper level:
find /media/MyDisk/Unsorted -iname "*.docx" -exec /home/user/Desktop/sortDocxByDate.sh "{}" /media/MyDisk/DocxSorted \;

The script:

#!/bin/bash
# This is to be used by "find -exec" and pass the files as argument then the destination
# This is for .docx only!
# Example: find . -maxdepth 1 -iname "*.docx" -exec ./sortDocxByDate.sh "{}" DocxSorted \;
# Written by MBH http://mbhtech.blogspot.com -- free to use and modify
theFile=$1
dst=$2

DirDate=`unzip -p $theFile docProps/core.xml | xmlstarlet sel -t -m //dcterms:modified -v . | cut -d- -f1,2`

if [ ! -d "$dst/$DirDate" ]; then
mkdir -p "$dst/$DirDate"
echo created dir $DirDate
fi

mv $theFile $dst/$DirDate/`basename $theFile`
#echo moving $theFile to $dst/$DirDate/`basename $theFile`

Saturday, April 21, 2012

The Flexible Code of Ethics

My buddy K pointed me to 2 links the other day. Here, see these two screenshots for yourself and tell me what do you see.


   


Yes, this is Khalid Al-Zanki at his usual act of plagiarism and theft. In case you're not familiar with his previous (bad) work of art, here you are.

This time, he's talking about ethics, and not only he copied Mashable's entire page, no! That's too typical of him; this time, he's also preaching in seminars about ethics! After he copied Mashable's entire page, with NOT A SINGLE MODIFICATION!

I hope for a day when people learn to use search engines and run background checks about the people they're bringing for seminars or training sessions.

* Figure out the links yourself. I won't link to his pages to not rank him higher on search engines.