Slow Motion Workout
The technical term is 5/5 Cadence (5 seconds up, 5 seconds down). I tried this for the first time on Sunday, it is really intense. Momentum is not there to help you. You will feel every part of your muscle throughout the motion.
Tim Ferris showed a simple formula to figure out what should be the starting weight to workout with. Simply do regular sets. If you can do 5 rep, wait a minute & then increase the weight by 10 lb or 10%. When you fail a set, then take 70% of last 5 rep set and use that weight for slow motion workout. You can figure out weights to use by trial and error. This should prevent injuries or wasted time.
The other part of choosing weights is to monitor progress. Every time to you finish a set with 7 reps, next time increase weight by 10% or 10 lb.
I never knew importance of rest days until I read it in this book. Your muscles grow during rest period. I used to workout everyday & not really gain any muscle.
Cat Vomit abs workout
You exhale as deeply as you can, hold for 10 seconds and then inhale. Repeat 10 times.
Do not drink calories
Not drinking calories is easy. Sweet stuff is disgusting anyways.
Bike Shed Effect
This is one of the best advice in the book. Basically, if you say you are building a nuclear power plant, no will tell you how to build it. If you tell them, you are building a bike shed, everyone will tell you how to do it even if they never build it.
Same thing happen when working out & eating healthy. Everyone thinks they know the best way of eating & working out. Ignore them.
Are you tired of checking data in your code before inserting? Well MySQL procedures are here to rescue. This simple procedure shows how you can do that:
CREATE PROCEDURE `update_insert_user`( IN uid2 int )
DECLARE last_login2 DATETIME;
SELECT `last_login` INTO last_login2 FROM `user` WHERE `uid` = uid2 LIMIT 1;
IF last_login2 IS NULL THEN
INSERT INTO `user` (`uid`,`last_login`) values (uid2, now());
UPDATE `user` SET `last_login` = now() WHERE `uid` = uid2 LIMIT 1;
Just spent 3 hours debugging a session bug in my webapp. CodeIginter was creating a brand new session with each page load. The issue was a misconfiguration with my config file.
Fix was simple, in
/application/config/config.php, make sure correct domain is set for
Query Saving is a feature of CI’s database class that stores the results of every query in memory until the controller is finished executing. As it turns out, in version 1.6.0, the ability to turn this off was added. The addition of the save_queries variable is listed in the Change Log, but as of the latest release of 2.0.0 last week, it still hasn’t made the documentation.
$this->db->save_queries = FALSE;
via Undocumented CodeIgniter | Green Egg Media.
One thing to note is that disabling
save_queries would disable some other Database class functions like
last_query(). So it is not just used by profiler.
I tried to login to my server tonight but kept getting following error message:
ssh_exchange_identification: Connection closed by remote host
The fix was simple, at least if you have access to server via cPanel. Just restart sshd service via cPanel/WHM.
I am not sure if this works anymore or not. I don’t use Pentaho now but this post seems popular, so leaving it here for now. Contact me if this is incorrect and needs to be corrected or taken down.
- Download Pentaho BI Pre-Configured Installation from [http://www.pentaho.org/download/ga.php]
- Install JDK5.
C:\pentaho-demo\pentaho-solutions\system\publisher_config.xml. Add a password for publishing reports.
- Delete all folders except reporting under
- Delete all
.properties files under reporting.
- Copy JDBC driver for your database under
C:\pentaho-demo\jboss\server\default\lib. I used Oracle 10g driver, it is called
- Edit .jsp file to change the look of default Pentaho website under
- Add path to your JDK in
start-pentaho.bat located under C:\pentaho-demo. For example,
set JAVA\_HOME=C:\Program Files\Java\jdk1.5.0\_11
- Double click on
C:\pentaho-demo\jboss\server\default\deploy\pentaho.war\WEB-INF\web.xml. Search for
base-url and add your server’s ip.
- Now you should be able to publish reports to Pentaho using Report Wizard or Report Designer.
- Once you publish report, you will need to go to
C:\pentaho-demo\jboss\server\default\deploy and open newly created data source file named something like
- If your database is Oracle you will need to change driver class property to
- And your newly published report should be accessible via Pentaho now.
Using sar, you can also collect all performance data on an on-going basis, store them, and do historical analysis to identify bottlenecks.
via 10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring.