Posts

Showing posts from November, 2013

Using wget bypass htaccess username password 401 authorization

Here is the command to access a website where using htaccess username and password to protect itself. wget -O /dev/null --user="_any_htaccess_user_name_" --password="_htaccess_user_password_" http://www.google.com Resource:   http://stackoverflow.com/questions/8841187/wget-and-htaccess-username-only By the way, you can use wget to simulate a visitor access to website.  Often time it is used to trigger a cron job. Another resource: http://pogidude.com/2011/use-linux-cron-to-trigger-wordpress-cron-scheduler/ http://bitswapping.com/2010/10/using-cron-to-trigger-wp-cron-php/ Hope it helps someone.

Wordpress - Separate PHP page call WPML function

If you just like me who need to create a new empty PHP page inside Wordpress, and you need to call that page inside wordpress, together with using WPML, here is the way:  Assume that your brand new PHP file is under wp-content/themes/your-theme/new_file.php This new_file.php will receive data from other wordpress page. Now: # require_once wp-load.php to use all wordpress functions  require_once dirname(dirname(dirname(dirname(__FILE__)))).'/wp-load.php'; if(!function_exists('any_new_function')){      function any_new_function(lang){          $lang = $_POST['lang_from_previous_wordpress_page'];          return $lang;     }      # if you are using WPML 3.0 or later, you will see this icl_set_current_language filter      # I am not sure if version prior to 3.0 will have it or not, just search in sitepress.class.php to find out.      add_filter('icl_set_current_language', 'any_new_function'); }  # Init this plugin, the constructio

In response to "8 Sentences That Drive Bosses Crazy"

In response to this article about "8 Sentences That Drive Bosses Crazy" Every employee said something for a reason and a history behind it.  If your employee said those to your boss, it is (most of the time) the boss problem not (always) employee. Here are why: 1. "Exactly how do you want me to do this?" Boss's best response: "I don't care how you do it, just get it done." Employee replied: Then don't ask me to give you a full report on why I am doing that later on, because you don't care. 2.  "This is my idea so I want full credit for it." Boss's best response: "If you want this to happen, we'll all need to own it." Employee replied: You are stealing my idea and claim that it is "us"?   3.  "I'll try to get it done on time." Boss's best response: "Do. Or do not. There is no try." Employee replied: DO NOT, unless you give us a REASONABLE schedule, or you tell

Definition of Selling - The Dan Sullivan Way

Dan Sullivan definition of Selling: Getting someone to intellectually engaged in the future result that is good for them and getting them to emotionally committed to an action to achieve that result .