Home » Archive

Articles in the Miscellaneous Category

Miscellaneous »

[9 Oct 2013 | No Comment | ]

Hello Internet.
First of all, a million thanks for everyone who participated in this survey, thanks for taking the time to help me and others like me.
(If you participated and you want your data removed i will respect your wish just contact me via comments here on on twitter)
Here is an overview of the stats of the 22 participants that filled my survey https://www.esurveycreator.com/s/89e59b7
The first question is how happy are you, The range is being sad to being the happiest person ever:
The average happiness ratio is 62.15%

It’s good ratio but i …

Miscellaneous »

[16 Sep 2013 | No Comment | ]

Hello fellow internet citizens (and bots)
Here is some cool PHP malicious files i found in one hacked installation of WHMCS and one hacked wordpress site.
Note #1 they are mostly not a result of one hack/hacker but several.
Note #2 those are harmful files running them on your computer is not advised, and those are supplied for research purposes only.
Here are the files: click here password is: infected
This is the most interesting file which is r.php (VirusTotal scan: 3/48) it is “WHMCS Killer” by rab3oun
The decoding line is decoded to:
It keeps reading …

Miscellaneous »

[25 Aug 2013 | 2 Comments | ]

I got this error while running an application i compiled under cygwin Windows XP (32 bit)
‘cygwin’: unknown terminal type.
The fix is by shipping your executable(s) with the folder of cywgwin “usr\share\terminfo\63”
The usr folder has to be in the same level as your application folder. (it has to be accessible as ../usr of the application)

Miscellaneous »

[16 Jul 2013 | 7 Comments | ]

Rufus (if you don’t know) is an awesome tool for creating bootable USB drives from ISO images.
I Used it many times and it went flawless but this time it didn’t get past the first operation, and in the log it gave me this error:
“A device was eliminated because it didn’t report itself as a non fixed USB disk”
I don’t know what that even means, and there is no google hits for it.
Anyway, i fixed it by formatting the USB drive to file system FAT then with Rufus did it normally …

Featured, Headline, Miscellaneous »

[27 Jun 2013 | No Comment | ]
Got a problem? Fix it the lazy way

I was on the interwebz like usual surfing and doing important productive stuff (reading or watching security tutorials, reading/answering stackoverflow questions/replies, tweeting, watching lolcats or youtube fail videos.. etc) and when suddenly the laptop rebooted with no warning.
When it restarted i noticed the screen was too dark, like it’s emitting half of the light it used to do.
What i did?
Checked the video card driver status, and the drivers properties (Gamma and Brightness) i raised them it gave it more light but not enough and it wasn’t feeling right.
Noticed F5 has …

Miscellaneous »

[5 May 2013 | No Comment | ]

Here is how you backup the database from a SSH window
Here is how you can you backup mysql database in linux and restore them.
You’ll need to edit USERNAME, DATABASE_NAME, USER_PASSWORD, file.sql in the following commands.
Here is the command to back up the database:
mysqldump -u USERNAME -pUSER_PASSWORD DATABASE_NAME > backup.sql
And you will have backup.sql in the current directory.
Here are the commands to create a Mysql user, password and database then restore the SQL file:
Login as root for mysql:
mysql -p
Then enter the root password then edit and post the following.


Miscellaneous »

[22 Aug 2012 | One Comment | ]

My friend Denis Laskov asked if that was possible.

Youtube HTML5 video download without toolbars and extentions? #help
— Denis Laskov (@it4sec) August 22, 2012

After few minutes of trying (and optimizing) i got it working.
Copy and paste that into the URL bar or drag this and use it as a bookmarklet.
javascript:void(str=decodeURIComponent(yt.playerConfig.args.url_encoded_fmt_stream_map));document.write(‘<a href=\”+str.substr(4,str.indexOf(‘quality’)).replace(‘&sig=’,’&signature=’)+’\’>download</a>’);
Tested working in Opera 11 but it should work on all decent browsers.
And OFC on HTML5 youtube not the flash one.
PS: The reason why all youtube downloading services are mostly in java and need to run on your machine is that …

Miscellaneous »

[2 Jun 2012 | 2 Comments | ]

Hello people (And bots) i got this game “LIMBO” (and others) via the humble bundle.
You can pay $1 to get the 4 games on steam, and if you pay more than average (~$7.80) you get the extra game “Bastion”, but you shouldn’t be cheap pay more to support indie game developers and charity.
It really widens your imagination everyone should play it (13+ ,i don’t recommend it for 6 yrs olds).
And it works in Mac, Windows, and Linux!
I played it for an hour or so and i LOVE IT!
The game is …

Coding, Miscellaneous »

[12 Aug 2011 | 20 Comments | ]

When running CLI PHP on windows i got that error:
The program can’t start because php_mbstring.dll is missing from your computer
PHP The program can’t start because dll is missing from your computer. Try reinstalling the program to fix this problem.
And i’ve verified the file is there and the version is correct.

Also another error was:
PHP Warning: PHP Startup: Unable to load dynamic library ‘F:/AppServ\php5\ext\p
hp_exif.dll’ – The specified module could not be found.

Anyway thanks to wez’s solution here, i fixed it.
In php.ini this line:
Was before this one

I switched them and it’s working …

Miscellaneous »

[6 Apr 2011 | No Comment | ]

The function crop_text() crops certain string by word count.
so If you have a string like this:
$text = “The quick brown fox jumps over the lazy dog”;
running crop_text($text,5,’…’) will return:
“The quick brown fox jumps…”
Here is the function

function crop_text($text,$len,$sep){
$cropped = ”;
$words = explode(‘ ‘, $text);
//split the paragraph into array of words
if(count($words) < $len){
$cropped = $text;
//if the word count is less than the desired length accept it all
$cropped .= ‘ ‘.$words[$i];
//concatinating the words into one string
$cropped = $cropped.$sep;
//append the ending text e.g. (‘…’ or read more etc)
return $cropped;