Quantcast
Channel: EmotiCODE - Snippets and Source Code Search Engine
Browsing all 64 articles
Browse latest View live

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 Article



Bash - 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 Article

PHP - Redirect based on referrer

View Article

Bash - Display IP that generate DDoS attack

$ netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n ...

View Article

JavaScript - 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 Article


HTML - Create Windows 8 Tile for your Site

Adding a Windows 8 Start Screen Tile for your site. Not for Windows Mobile.

View Article

HTML - 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 Article

PHP - 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 Article


prettyPhoto 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 Article


Download 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 Article

Handle screen orientation change with state persistance example.

An example of screen orientation change handling with some state persistance using the Bundle class.

View Article

Interaction between Activity and Service example.

An example interaction between an Activity and a Service with the Android SDK.

View Article

Reflect 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 Article


How 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 Article

Block 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 Article


Programmatically 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 Article

Google Maps and Geolocation with PhoneGap

How to use Geolocation service with PhoneGap to obtain current device GPS coordinates.

View Article


How 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 Article

Stat Apache website

show informations about unique visitors on your site you can put inside cron.monthly

View Article

Log 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
Browsing all 64 articles
Browse latest View live




Latest Images