Archive for the ‘Solutions’ Category
-
Ban IP from logging in for 5 minutes after 10 failed logins
if( login_limit() ) die( ‘Your IP has been banned from logging in for the next 5 minutes’ ); /* * Counts login times by same IP * returns true if limit reached or false if not */ function login_limit(){ //get real IP if user behind proxy noted [...]
-
Convert vBulletin DB encoding to UTF-8
great help @ http://mansurovs.com/tech/converting-vbulletin-to-utf-8 these are the exact commands that worked for me
-
jQuery plugin : monnaTip 0.1
This the simplest tooltip jQuery plugin you can find around. features: takes advantage of live(), mouseenter and mouseleave methods tracks mouse movement right and bottom viewport border tracking can be applied on any element Demo – download – Google code
-
Configure sendmail to accept emails only if “from”, “to” or specific field matches
you can exclude an email address or even a host that is spamming you using the access file located in your etc directory, the bad news is that it does not support regex or even wildcards.
-
Remotley start programs on your Linux Desktop
It is very easy to start programs remotely on your windows desktop from another computer but running X11 application on Linux from another ssh session would start a new X11 session on your remote machine, that was a problem for me and here is how I solved that…..
-
Sort Unix processes on ps by highest memory usage
just a snippet, –sort is not good for me..try ps -eo pmem,pcpu,rss,vsize,args | sort -k 1 -r | more
-
Sitemap Creator 0.2a: Create sitemaps 09 valid for Google, Yahoo, MSN, Ask.com and moreover sitemaps
New Sitemap Creator Beta available Sitemap Creator 0.2a is different from version 0.1, The script now is able to crawl/spider your website, create your sitemaps, ping Google, Yahoo, MSN, Ask.com, moreover.com with the location of your sitemaps and send you alerts by email when sitemaps are created or crawled by the search bot. The crawler [...]
-
Adding FAlbum URLs to XML-Sitemap WordPress Plugin
As I mentioned on my previous post yesterday about Fixing FAlbum Plugin that I’m trying to add support for Google XML Sitemaps Plugin to FAlbum so that all URLs including albums, photos and tags would be added to Blog’s Sitemap which would be crawled by Google, Yahoo and MSN .
-
Fixing Flickr FAlbum rewrite rules, thumbnails, javascripts and more …
This is not working anymore FAlbum is a WordPress Plug-in that adds your Flickr photo albums to your blog without redirecting the viewer to Flickr or leaving your blog. It is very useful and unique, I have always needed that plugin on my blog, however, some features needed a lot of digging into the code [...]
-
BPEL4WS Series
Process Modeling Abstract In this article, we will walk through modeling a sample process using the Business Process Execution Language for Web Services. This article uses Sybase PowerDesigner as the modeling tool and J2EE 1.4 as the programming and deployment platform. The article assumes basic knowledge of BPEL4WS, UML, WSDL and J2EE technologies.
-
Dynamic Content Caching using Lighty + mod_magnet + lua
*Updated 11 Jan 2007 to include luazlib, fix lighty config file and add zlib decoding to cache.lua for older browsers Since I read the documentations for mod_cml, I was very excited to use this module since caching using PHP running as FastCGI is not helping much during server peak load. However, mod_cml was replaced by [...]
-
Using iptables to block ips that spam or attack your server
Why should you do that while APF or CSF can do it automatically? Because APF/CSF could block an important bot testing your server to add to search index. So reviewing every ip would be a daily task! Ok, so how? using RHEL4, centos4
-
get an array containing random integers between $min and $max integers
Trying to pick up random keys from an array but don’t want any duplicates? try this
-
Using Google AJAX API to copy google results in array
This is some way you can get Google results as a JavaScript array that you can display on any page, you first need to get your Google API Key then try this code…
-
Get average server load
This function should work on Unix as on windows
-
Allow bots / spiders / crawlers into your private vbulletin forums
There are some very complicated hacks to add but this one line script to do it. This should be applied to VB 3.5.4 add these lines to the end of your init.php file located in forumroot\includes\init.php
-
XUL : open URL with a referrer
This is a small function to use in Firefox extension development which makes use of the referrer parameter sent to loadURI() and addTab() functions
-
Start multiple programs with one click on windows
It is annoying how most installed programs set them selves in windows startup which you can then manually remove through Startmenu -> run -> msconfig -> uncheck uneeded programs or services (services could be set to start manually better than disabling it and has the same effect) but then we need to start some favorite [...]
-
Get Keyword from referrer
This Function should extract the keyword from the referrer URL to get what your visitor was searching for on google, msn, live, altavista, alltheweb, scirus, aol, vivisimo, lycos, aliweb, yahoo and baidu.
-
Integrate Theme Switcher
What if you want Theme Switcher into all your WordPress Themes? Try this Open file “wp-includes\template-functions-general.php” and search for “function wp_meta() {“ add this code just after "do_action(‘wp_meta’);" echo "<h2>Themes:</h2><div>"; wp_theme_switcher(‘dropdown’); echo "</div>"; save the file, and you’ll get the Theme Switcher on everypage after the meta
