Monday, 27 August 2012
PhalconPHP - A PHP Framework Available As An Extension
Phalcon framework, a new approach on PHP frameworks. PhalconPHP is an interesting PHP framework delivered as a C extension providing high performance and lower resource consumption.
Phalcon is an open source, full stack framework for PHP 5 written as a C-extension, optimized for high performance. You don’t need learn or use the C language, since the functionality is exposed as PHP classes ready for you to use. Phalcon is loosely coupled, allowing you to use its objects as glue components based on the needs of your application.
For compilation, follow the following steps:
Then, add extension to your php.ini
And finally restart the webserver.
Useful Links
PhalconPHP on GitHub
Interesting review on PhalconPHP
PhalconPHP Documentation
PHP MVC framework benchmark at ruilog.com
PHP MVC framework benchmark at laruence.com
Read more...
What is Phalcon
Phalcon is an open source, full stack framework for PHP 5 written as a C-extension, optimized for high performance. You don’t need learn or use the C language, since the functionality is exposed as PHP classes ready for you to use. Phalcon is loosely coupled, allowing you to use its objects as glue components based on the needs of your application.
For compilation, follow the following steps:
# git clone git://github.com/phalcon/cphalcon.git
# cd cphalcon/release
# export CFLAGS="-O2 -fno-delete-null-pointer-checks"
# phpize
# ./configure --enable-phalcon
# make
# sudo make install
# cd cphalcon/release
# export CFLAGS="-O2 -fno-delete-null-pointer-checks"
# phpize
# ./configure --enable-phalcon
# make
# sudo make install
Then, add extension to your php.ini
extension=phalcon.so
And finally restart the webserver.
Useful Links
PhalconPHP on GitHub
Interesting review on PhalconPHP
PhalconPHP Documentation
PHP MVC framework benchmark at ruilog.com
PHP MVC framework benchmark at laruence.com
Read more...
PhalconPHP - A PHP Framework Available As An Extension
2012-08-27T23:35:00+05:45
Cool Samar
news|phalcon|php|
Comments
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Install XAMPP 1.8 From PPA In Ubuntu
Since apache friends has released the v. 1.8 of XAMPP for linux and windows, its important you guys upgrade your XAMPP. In this post, you will find the instructions to install XAMPP 1.8 from PPA.
The most important updates of v. 1.8.0 of XAMPP are: Apache 2.4.2, MySQL 5.5.25a, PHP 5.4.4, and phpMyAdmin 3.5.1. Since the software components are updated, I strongly recommend to upgrade your XAMPP.
All you have to do is follow the following steps in order:
Alternatively, you can download the tar file for XAMPP from Apache Friends and follow their instructions to install XAMPP 1.8.0. In case you're looking for upgrading your previous XAMPP installation, be sure to follow this How To.
I hope this helps :)
Read more...
The most important updates of v. 1.8.0 of XAMPP are: Apache 2.4.2, MySQL 5.5.25a, PHP 5.4.4, and phpMyAdmin 3.5.1. Since the software components are updated, I strongly recommend to upgrade your XAMPP.
All you have to do is follow the following steps in order:
sudo add-apt-repository ppa:upubuntu-com/xampp
sudo apt-get update
sudo apt-get install xampp
sudo apt-get update
sudo apt-get install xampp
Alternatively, you can download the tar file for XAMPP from Apache Friends and follow their instructions to install XAMPP 1.8.0. In case you're looking for upgrading your previous XAMPP installation, be sure to follow this How To.
I hope this helps :)
Read more...
Install XAMPP 1.8 From PPA In Ubuntu
2012-08-27T22:56:00+05:45
Cool Samar
apache|linux|ubuntu|ubuntu 11.10|xampp|
Comments
Labels:
apache,
linux,
ubuntu,
ubuntu 11.10,
xampp
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
How To Manually Install Flash Player 11 In Linux
This post will provide a step by step instructions for installing flash player 11 plugin in ubuntu 11.04 and other different versions and distros. This will be helpful for everybody who are having trouble with the software center like I had.
Make sure no firefox process is running and then fire up the terminal and type the following commands in order:
Once you have finished copying the shared object and other necessary files in their respective target directories, you can open the firefox and you're good to go. :)
Read more...
Make sure no firefox process is running and then fire up the terminal and type the following commands in order:
mkdir -p ~/flash && cd ~/flash
wget http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.238.orig.tar.gz
tar -zxvf adobe-flashplugin_11.2.202.238.orig.tar.gz
sudo cp -r libflashplayer.so /usr/lib/firefox/plugins
sudo cp -r usr/* /usr
wget http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_11.2.202.238.orig.tar.gz
tar -zxvf adobe-flashplugin_11.2.202.238.orig.tar.gz
sudo cp -r libflashplayer.so /usr/lib/firefox/plugins
sudo cp -r usr/* /usr
Once you have finished copying the shared object and other necessary files in their respective target directories, you can open the firefox and you're good to go. :)
Read more...
How To Manually Install Flash Player 11 In Linux
2012-08-27T22:22:00+05:45
Cool Samar
fedora|internet|linux|mozilla firefox|plugin|tricks and tips|ubuntu|ubuntu 11.10|web|
Comments
Labels:
fedora,
internet,
linux,
mozilla firefox,
plugin,
tricks and tips,
ubuntu,
ubuntu 11.10,
web
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Monday, 20 August 2012
Build A Sample Custom Packet [Embedded Systems]
This code snippet was my submission for embedded systems assignment from the embedded system black book by Dr. K.V.K.K. Prasad. It is in no way a real packet and is not meant to represent the IP layer.
Question: Write a C program that takes the filename as input and generates packets of 100 bytes. Develop a simple packet format of your own.
Compilation:
Read more...
Question: Write a C program that takes the filename as input and generates packets of 100 bytes. Develop a simple packet format of your own.
Compilation:
gcc -Wall -lm -o custom_packet custom_packet.c
//custom_packet.c // //eg: ./custom_packet /home/samar/Desktop/cs_rules.txt //Compilation: gcc -Wall -lm -o custom_packet custom_packet.c //Custom Packet: Header -> 20 bytes and Data -> 80 bytes //Find me on http://www.techgaun.com #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> typedef struct { int8_t fragment_offset; int8_t ttl; int32_t source_ip; int32_t dest_ip; } custom_packet_header; typedef struct { custom_packet_header header; char data[80]; } custom_packet; long int get_file_size(char fname[]) { int fd; int count; if ((fd = open(fname, O_RDONLY)) == -1) { perror("Error reading the file\n"); exit(EXIT_FAILURE); } struct stat buf; fstat(fd, &buf); count = buf.st_size; close(fd); return count; } int decimalip2numeric(int a, int b, int c, int d) { return (a * 16777216 + b * 65536 + c * 256 + d); } /*char * numericip2decimal(int num) { char strs[4]; strs[0] = (char *) num / 1677; }*/ int main(int argc, char **argv) { FILE *fp; //char fname[256]; //255 bytes is the limit of filename in extN filesystems custom_packet * packets; long int fsize; int num_of_packet, i; if (argc != 2) { printf("Usage: %s filename\n", argv[0]); exit(1); } fsize = get_file_size(argv[1]); num_of_packet = ceil((double)fsize / 80.0); printf("%ld => %d",fsize, num_of_packet); if ((fp = fopen(argv[1], "rb")) == NULL) { perror("Error opening the file"); exit(1); } packets = (custom_packet *) malloc(sizeof(custom_packet) * num_of_packet); for (i = 0; i < num_of_packet; i++) { packets[i].header.source_ip = decimalip2numeric(127, 0, 0, 1); //storing source ip as 127.0.0.1 for now packets[i].header.dest_ip = decimalip2numeric(127, 0, 0, 1); //storing dest ip as 127.0.0.1 for now packets[i].header.ttl = 127; packets[i].header.fragment_offset = i; } i = 0; while (!feof(fp)) { fread((void *)packets[i].data, 80, 1, fp); i++; } fclose(fp); printf("\n\n----- Printing all the crafted packets -----\n\n"); for (i = 0; i < num_of_packet; i++) { printf("[---- Packet Fragment no. %d ----", packets[i].header.fragment_offset); printf("\nSource IP -> %d\nDestination IP -> %d\nTime to live -> %d\n", packets[i].header.source_ip, packets[i].header.dest_ip, packets[i].header.ttl); printf("Packet data -> %s", packets[i].data); printf("\n---- End of Packet no. %d ----]\n\n", packets[i].header.fragment_offset); } return 0; }
Read more...
Build A Sample Custom Packet [Embedded Systems]
2012-08-20T11:06:00+05:45
Cool Samar
C/C++|internet protocol|programming|
Comments
Labels:
C/C++,
internet protocol,
programming
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Friday, 17 August 2012
Bypass Android Pattern Lock In Easy Steps
Android devices has this security feature known as pattern lock which prevents the access of other people in your device. One of the senior members at XDA has revealed a way to bypass this pattern lock feature completely.
There have been several attempts on finding different methods for bypassing pattern unlocking in the android devices. Early methods were tracking the smudges on the screen and guessing since human are more likely to use the patterns they have already seen.
This method, posted in XDA developers forum by m.sabra, requires the USB debugging to be enabled in the android device and then you can use ADB (Android Debug Bridge), a part of Android SDK to easily bypass the pattern unlock with few lines of commands. The user has revealed two methods for bypassing this, the first one involves running few SQLite queries and the second one requires deleting the associated key.
You will need to download the Android SDK in order to continue with this hack.
Method 1:
AND/OR
Method 2:
You can either choose one of the methods or perform both of the methods (method 1 first and method 2 second). Be sure to reboot once you perform any of the above mentioned methods.
Users have said that this method is not working on the latest Android Jelly Bean and other custom ROMs such as Cyanogen Mod. But, earlier android versions are vulnerable to this hack.
Even if the USB debugging is disabled, you can still run these methods if custom recovery was installed in the android device. You will have to mount the working partition. Just go to 'Mounts and Storage' and mount /data. Then you can follow the above methods to bypass the lock.
Read more...
There have been several attempts on finding different methods for bypassing pattern unlocking in the android devices. Early methods were tracking the smudges on the screen and guessing since human are more likely to use the patterns they have already seen.
This method, posted in XDA developers forum by m.sabra, requires the USB debugging to be enabled in the android device and then you can use ADB (Android Debug Bridge), a part of Android SDK to easily bypass the pattern unlock with few lines of commands. The user has revealed two methods for bypassing this, the first one involves running few SQLite queries and the second one requires deleting the associated key.
You will need to download the Android SDK in order to continue with this hack.
Method 1:
adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit
AND/OR
Method 2:
adb shell rm /data/system/gesture.key
You can either choose one of the methods or perform both of the methods (method 1 first and method 2 second). Be sure to reboot once you perform any of the above mentioned methods.
Users have said that this method is not working on the latest Android Jelly Bean and other custom ROMs such as Cyanogen Mod. But, earlier android versions are vulnerable to this hack.
Even if the USB debugging is disabled, you can still run these methods if custom recovery was installed in the android device. You will have to mount the working partition. Just go to 'Mounts and Storage' and mount /data. Then you can follow the above methods to bypass the lock.
Read more...
Labels:
android,
hacking,
security bypass,
tricks and tips
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Monday, 13 August 2012
Screen Recording Software Solutions For Linux
Windows users have several options to choose from when it comes to the desktop recording (and only paid ones are good generally) but Linux users have fewer options but robust, simple, and best of all, free and open source desktop screen recording tools that we can trust on.
Below are some of the screen recording tools you might want to try:
recordMyDesktop is a desktop session recorder for GNU/Linux written in C. recordMyDesktop itself is a command-line tool and few GUI frontends are also available for this tool. There are two frontends, written in python with pyGtk (gtk-recordMyDesktop) and pyQt4 (qt-recordMyDesktop). recordMyDesktop offers also the ability to record audio through ALSA, OSS or the JACK audio server. Also, recordMyDesktop produces files using only open formats. These are theora for video and vorbis for audio, using the ogg container.
Installation under debian and ubuntu:
XVidCap is a small tool to capture things going on on an X-Windows display to either individual frames or an MPEG video. It enables you to capture videos off your X-Window desktop for illustration or documentation purposes.It is intended to be a standards-based alternative to tools like Lotus ScreenCam.
Istanbul is a desktop session recorder for the Free Desktop. It records your session into an Ogg Theora video file. To start the recording, you click on its icon in the notification area. To stop you click its icon again. It works on GNOME, KDE, XFCE and others. It was named so as a tribute to Liverpool's 5th European Cup triumph in Istanbul on May 25th 2005.
Vnc2flv is a cross-platform screen recording tool for UNIX, Windows or Mac. It captures a VNC desktop session (either your own screen or a remote computer) and saves as a Flash Video (FLV) file.
Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and generate a highly effective tutorial for your users. It requires GTK 2.4 or higher and unfortunately is just a freeware(could not find any source code for it).
Screenkast is a screen capturing program that records your screen-activities, supports commentboxes and exports to all video formats.
If you got any more suggestions, please drop the comment. :)
Read more...
Below are some of the screen recording tools you might want to try:
recordMyDesktop
recordMyDesktop is a desktop session recorder for GNU/Linux written in C. recordMyDesktop itself is a command-line tool and few GUI frontends are also available for this tool. There are two frontends, written in python with pyGtk (gtk-recordMyDesktop) and pyQt4 (qt-recordMyDesktop). recordMyDesktop offers also the ability to record audio through ALSA, OSS or the JACK audio server. Also, recordMyDesktop produces files using only open formats. These are theora for video and vorbis for audio, using the ogg container.
Installation under debian and ubuntu:
sudo apt-get install gtk-recordmydesktop
XVidCap
XVidCap is a small tool to capture things going on on an X-Windows display to either individual frames or an MPEG video. It enables you to capture videos off your X-Window desktop for illustration or documentation purposes.It is intended to be a standards-based alternative to tools like Lotus ScreenCam.
sudo apt-get install xvidcap
Istanbul
Istanbul is a desktop session recorder for the Free Desktop. It records your session into an Ogg Theora video file. To start the recording, you click on its icon in the notification area. To stop you click its icon again. It works on GNOME, KDE, XFCE and others. It was named so as a tribute to Liverpool's 5th European Cup triumph in Istanbul on May 25th 2005.
sudo apt-get install istanbul
Vnc2Flv
Vnc2flv is a cross-platform screen recording tool for UNIX, Windows or Mac. It captures a VNC desktop session (either your own screen or a remote computer) and saves as a Flash Video (FLV) file.
Wink
Wink is a Tutorial and Presentation creation software, primarily aimed at creating tutorials on how to use software (like a tutor for MS-Word/Excel etc). Using Wink you can capture screenshots, add explanations boxes, buttons, titles etc and generate a highly effective tutorial for your users. It requires GTK 2.4 or higher and unfortunately is just a freeware(could not find any source code for it).
Screenkast
Screenkast is a screen capturing program that records your screen-activities, supports commentboxes and exports to all video formats.
If you got any more suggestions, please drop the comment. :)
Read more...
Screen Recording Software Solutions For Linux
2012-08-13T17:21:00+05:45
Cool Samar
fedora|linux|software|ubuntu|ubuntu 11.10|video|
Comments
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Download Youtube Videos From Command-Line With Youtube-dl
youtube-dl is a small command-line program to download videos from YouTube.com and few more sites. All it requires is the Python interpreter version 2.5 or higher, and it is not platform specific.
This small tool is simple and offers everything you would love to have, but not the GUI. It supports several websites listed as below:
Supported sites
YouTube.com.
YouTube.com playlists (playlist URLs in "view_play_list" form).
YouTube.com searches
YouTube.com user videos, using user page URLs or the specifc "ytuser" keyword.
metacafe.com.
Google Video.
Google Video searches ("gvsearch" keyword).
Photobucket videos.
Yahoo! video.
Yahoo! video searches ("ybsearch" keyword).
Dailymotion.
DepositFiles.
blip.tv.
vimeo.
myvideo.de.
The Daily Show / Colbert Nation.
The Escapist.
A generic downloader that works in some sites.
You can download the tool from GitHub. For more information about the tool, check the documentation. The standalone executable for windows is also available for download from the same github repository.
Read more...
This small tool is simple and offers everything you would love to have, but not the GUI. It supports several websites listed as below:
Supported sites
YouTube.com.
YouTube.com playlists (playlist URLs in "view_play_list" form).
YouTube.com searches
YouTube.com user videos, using user page URLs or the specifc "ytuser" keyword.
metacafe.com.
Google Video.
Google Video searches ("gvsearch" keyword).
Photobucket videos.
Yahoo! video.
Yahoo! video searches ("ybsearch" keyword).
Dailymotion.
DepositFiles.
blip.tv.
vimeo.
myvideo.de.
The Daily Show / Colbert Nation.
The Escapist.
A generic downloader that works in some sites.
You can download the tool from GitHub. For more information about the tool, check the documentation. The standalone executable for windows is also available for download from the same github repository.
Read more...
Download Youtube Videos From Command-Line With Youtube-dl
2012-08-13T02:54:00+05:45
Cool Samar
software|tricks and tips|useful website|youtube|
Comments
Labels:
software,
tricks and tips,
useful website,
youtube
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Sunday, 12 August 2012
Rootbeer - High Performance GPU Computing in JAVA
Good news for JAVA guys that the high performance GPU compiler has been released that aims to bring high performance GPU computing to the Java Programming Language with the minimal effort from the developer.
Rootbeer is more advanced than CUDA or OpenCL Java Language Bindings. With bindings the developer must serialize complex graphs of objects into arrays of primitive types. With Rootbeer this is done automatically. Also with language bindings, the developer must write the GPU kernel in CUDA or OpenCL. With Rootbeer a static analysis of the Java Bytecode is done (using Soot) and CUDA code is automatically generated.
Rootbeer was created using Test Driven Development and testing is essentially important in Rootbeer. Rootbeer is 20k lines of product for and 7k of test code and all tests pass on both Windows and Linux. The Rootbeer test case suite covers every aspect of the Java Programming language except:
1. native methods
2. reflection
3. dynamic method invocation
4. sleeping while inside a monitor.
This means that all of the familar Java code you have been writing can be executed on the GPU.
GitHub of Rootbeer
Read more...
Rootbeer is more advanced than CUDA or OpenCL Java Language Bindings. With bindings the developer must serialize complex graphs of objects into arrays of primitive types. With Rootbeer this is done automatically. Also with language bindings, the developer must write the GPU kernel in CUDA or OpenCL. With Rootbeer a static analysis of the Java Bytecode is done (using Soot) and CUDA code is automatically generated.
Rootbeer was created using Test Driven Development and testing is essentially important in Rootbeer. Rootbeer is 20k lines of product for and 7k of test code and all tests pass on both Windows and Linux. The Rootbeer test case suite covers every aspect of the Java Programming language except:
1. native methods
2. reflection
3. dynamic method invocation
4. sleeping while inside a monitor.
This means that all of the familar Java code you have been writing can be executed on the GPU.
GitHub of Rootbeer
Read more...
Rootbeer - High Performance GPU Computing in JAVA
2012-08-12T20:52:00+05:45
Cool Samar
gpu computing|java|software|
Comments
Labels:
gpu computing,
java,
software
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Subscribe to:
Posts (Atom)