PHP - [WordPress] Show last items of a category
This code to show the latest articles in a category. Useful for creating a widget on WordPress blog.
View ArticleBash - Automatic refresh Feed a Fever
This code is used to automatically update your feed, is an alternative method to the one proposed by the developer with curl. Add the code in a cronjob repeated every 15 minutes. Only for Feed a Fever...
View ArticleBash - Display IP that generate DDoS attack
$ netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n ...
View ArticleJavaScript - ADBlock Plus Detection
This script is used to show a message if the user use Adblock Plus. This code uses the filtering rules of AdBlock: http://adblockplus.org/en/filter-cheatsheet Thanks: Evilsocket and Erik Swan
View ArticleHTML - Create Windows 8 Tile for your Site
Adding a Windows 8 Start Screen Tile for your site. Not for Windows Mobile.
View ArticleHTML - Create Windows Phone 8 Tile for your Site
This code allows you to add to the main screen of the smartphone Windows Phone 8 a "tile" to your site.
View ArticlePHP - Code to find out if your email has been read
If you want to find out if a user has read your e-mail, adding a line of HTML code invoking a loaded image on your own web server. Es <img src="http://www.yourhost.com/image.php"> When the user...
View ArticleprettyPhoto v3.1.5 XSS Vulnerability
The following code contains an XSS vulnerability, as demonstrated here: http://cloud.draghetti.it/Rehost_Image/Schermata%202013-10-08%20alle%2009.26.30.png Vulnerability reported by @Hambucker, Test,...
View ArticleDownload an image from url and display to it UIImage control.
How to download an image from its url and display it to an UIImage control with the iPhone SDK.
View ArticleHandle screen orientation change with state persistance example.
An example of screen orientation change handling with some state persistance using the Bundle class.
View ArticleInteraction between Activity and Service example.
An example interaction between an Activity and a Service with the Android SDK.
View ArticleReflect device movements using SensorManager.
Registering as a SensorEventListener your Activity will receive in the onSensorChanged method on every event one of the device sensors trigger. This way you could remap the coordinate system of your...
View ArticleHow to start a phone call with the Android SDK
How to start a phone call with the Android SDK using the ACTION_CALL intent and a "tel:" parsable uri.
View ArticleBlock incoming and outgoing phone calls programmatically.
This is how to programmatically block incoming and outgoing phone calls registering a broadcast receiver and a phone state listener.
View ArticleProgrammatically install an APK to the user device
Programmatically installing an Android APK to the user device could be a useful trick to auto update your application, or installing dependencies to make it correctly work. The following snippet will...
View ArticleGoogle Maps and Geolocation with PhoneGap
How to use Geolocation service with PhoneGap to obtain current device GPS coordinates.
View ArticleHow to record a phone call on Android
This is how to use the MediaRecorder SDK class to record phone calls happening on the device, be aware that MediaRecorder.AudioSource.VOICE_CALL is not always supported by vendor since recording phone...
View ArticleStat Apache website
show informations about unique visitors on your site you can put inside cron.monthly
View ArticleLog Rotate website
you should put this script inside cron.daily every day makes data backup of html code, sql and logs copy last backup on usb support dir hierarchy for example: /home/user1/--> htmlcode...
View Article