Kiranatama Staff
Knowledge

If you're using a lot JavaScript and CSS files on your application, you should consider this plugin to improve the perfomance your application, it will simply bundle your JavaScript and CSS in application.

Continue reading...
Kiranatama Staff
Knowledge

jCarousel Lite is a jQuery plugin that carries you on a carousel ride filled with images and HTML content. It can be applied with some effects and other customization. Installation:
  1. Download Jquery
  2. Download JcarouselLite here - http://www.gmarwaha.com/jquery/jcarousellite/#download
  3. Include those files in your application layout
Optional:
  1. Download easing plugin - http://gsgd.co.uk/js/jquery.easing.1.1.js
  2. Download mousewheel plugin - http://brandonaaron.net/jquery/plugins/mousewheel/jquery.mousewheel.js
  3. Add to application layout
 <script src="path/to/jquery.js" type="text/javascript"></script>
 <script src="path/to/jcarousellite.js" type="text/javascript"></script>
Usage : In your HTML file, provide the markup required by the carousel (a "div" enclosing an "ul"). You also need the navigation buttons, but these buttons need not be part of the carousel markup itself. Example: html
<button class="prev"><<</button>
<button class="next">>></button>
<div class="anyClass">
    <ul>
        <li><img src="someimage" alt="" width="100" height="100" ></li>
        <li><img src="someimage" alt="" width="100" height="100" ></li>
        <li><img src="someimage" alt="" width="100" height="100" ></li>
        <li><img src="someimage" alt="" width="100" height="100" ></li>
    </ul>
</div>
You can see more demos at http://www.gmarwaha.com/jquery/jcarousellite/#demo
Administrator Kiranatama Staff
Knowledge

Sometime we want to backup our databases for a reasons, like prevent the database deleted, move database to another server, etc. its very bored if we do it every day manually and sometime we forget to backup the database. so what we want is backup the database with something automatically with the time we have set, but how ? there is a lot of trick to do this, one of the is use shell script and cron. ok, lets do it 1. Create Shell Script
$ vim backup.sh
in vim editor put this script
#!/bin/bash
#directory backup
DIR_NAME="/directory/backup/"
#file name we will be used
FILE_NAME="mysqlbackup_`date +%Y%m%d%H%M%S`.sql"
#Variable NUM is used for counted total of existing backup file
NUM=`ls $DIR_NAME -R -1 | grep mysqlbackup | wc -l`
#maximal file backup
MAX=2
#email notification
MAIL="mail@domain.com"
#if reach maximum backup
if [ $NUM -ge $MAX ]; then
#find out the first file in backup directory
for i in $( ls $DIR_NAME -R -1 | grep mysqlbackup  ); do
#deleting first file that we found
rm -rf $DIR_NAME$i
#get out from the loop
break
done
fi
#backup all database
mysqldump -uusername -ppassword --all-databases &gt; $DIR_NAME$FILE_NAME
#compressed dump file
gzip -rf $DIR_NAME$FILE_NAME
#create notification file
echo "New Backup file created : $DIR_NAME$FILE_NAME.gz" &gt; /tmp/mydbbackup.log
#send notification to email
mail -s "New Backup file created" $MAIL &lt; /tmp/mydbbackup.log
save file "esc" ":wq" change the permission of file to execute file
$ chmod a+x backup.sh
and test
$  ./backup.sh
if this work you willl get a notification email, or for see the log see here :
$ cat /tmp/mydbbackup.log
next step is set the cron
$ sudo vim /etc/crontab
for example
# m h dom mon dow user  command
00 03 * * * username sh /directory/script/backup.sh #yourscript here
descriptions : m = Minute h = Hour dom = Day of Month mon = Month dow = Day of Week user = User command = command that will execute in conditions above 00 03 * * * .... this script will be running every day at 3 AM.
Kiranatama Staff
Knowledge

Update: Now this post using Rails 3.0.7 I found interesting pluginn for lightbox implementation with Facebook style, named Facebox. It allows us to use lightbox seamlessly in a Rails application.  You would use make a lightbox to display notice or error messages, form or even image without having to reload a page.

Continue reading...

Holidays + new web design  

11 Sep 2009
Administrator Kiranatama Staff
Knowledge

We also have a once-a-year long Indonesian holiday coming up soon next week :)All new contacts will still be responded within 24 work hours however. Another thing is that the KT website's design is now old - it's been more than a year now. We are currently on a major design overhaul and the prototypes are looking good! Wait for the upcoming launch!