Skip to main content

Posts

Yet another online shop launch

For housewife who use to work, daily activities are dull and boring. So I've been persuade my wife to run online shop to add variation on her daily routine. Finally we decided to start selling clothing goods and knick knacks, some are airbrush paint t shirt, woman snake leather handbag are there also Since I've been working with python, I came out to use satchmo for our online shop framework After doing customizing here and there and build some payment modules, we lauch WarungRupa.com  on early January 2012 We have some ideas which are still in our thoughts and we keen to work on it Hope WarungRupa.com  can have many visitors and buyers Next to do are SEO and promotions ^_^

Another django cms base

Cooper-cms, a really simple cms built with django that probably suitable for company site. It has testimonial, team, content and blog (of course :) ) modules. I know its not fancy as django-cms but it will suit for some simple company site though https://bitbucket.org/avenpace/cooper-cms

python-oauth2 hack

When you are using python-oauth2 from simplegeo on your Google App Engine instance, you'll get some exception that cause by "ImportError: No module named httplib2" Yes, apparently httplib2 are not supported by GAE and instead they oblige you to use google.appengine.api.urlfetch.fetch instead So I hack python-oauth2 to use google.appengine.api.urlfetch.fetch You can found my python-oauth2 fork on https://github.com/avenpace/python-oauth2

django realtime currency rate

Its been a really long time since I post something here For some dumb reason, I forgot my blogger login/password :hammer: Anyway, since I'm now heavily work with django stuff Here are some django related projects that hopefully can benefit anyone who need it * django-currency_rate, simple django app that can give you realtime currency rate base on http://themoneyconverter.com . Owh its even can calculate the rate with templatetag :) https://github.com/avenpace/django-exchange_rate

hacking sierra wireless aircard 555 on suse 10

Since there's a lot of changes from pcmcia-cs to pcmciautils, pcmcia operation suppose to be easier because it now work with hotplug. That mean when the card got inserted to the laptop, linux will just recognize it in a zap. But that's just doesn't work for sierra aircard 555 while you using suse 10. To make your aircard 555 work on suse 10, you need to fiddle around a bit with linux kernel. Owww and you will need you kernel source because we need to recompile the serial_cs module! First, make sure when you insert the card to pcmcia slot and the pcmciautils recognize your card type "pccardctl info" then you should get following output on your shell ong@saintlucifer:~> pccardctl status Socket 0: command 'status' not yet handled by pccardctl o3ng@saintlucifer:~> pccardctl info PRODID_1="Sierra Wireless" PRODID_2="AirCard 555" PRODID_3="A555" PRODID_4="Rev 1" MANFID=0192,a555 FUNCID=6 Then you need to get Aircard ...

failed create midcom

I try to create midcom site, when I run following command php /usr/local/lib/php/midcom/lib/midgard/admin/sitegroup/bin/create-host.php -u admin -p password --sitegroup_id 0 --topic_midcom midgard.admin.sitewizard --hostname localhost --host_prefix /sitewizard --extend_style template_Midgard --topic_name "Midgard Site Wizard" I got the following error PHP Warning: main(/usr/local/lib/php/midcom/lib/midgard/admin/sitegroup/bin/../../../../midcom/helper/hostconfig.php): failed to open stream: No such file or directory in /usr/local/lib/php/midcom/lib/midgard/admin/sitegroup/bin/create-host.php on line 19 Warning: main(/usr/local/lib/php/midcom/lib/midgard/admin/sitegroup/bin/../../../../midcom/helper/hostconfig.php): failed to open stream: No such file or directory in /usr/local/lib/php/midcom/lib/midgard/admin/sitegroup/bin/create-host.php on line 19 PHP Fatal error: main(): Failed opening required '/usr/local/lib/php/midcom/lib/midgard/admin/sitegroup/bin/../../../../mi...

java MessageDigest

If you use MessageDigest in java to encrypt string, you wont get hash like other language does. So you need to convert the result so that you can compare the hash result with other output that produce by diff language. Found the function on the java net forum private static String baToHexString(byte byteValues[]) { byte singleChar = 0; if (byteValues == null || byteValues.length String entries[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; StringBuffer out = new StringBuffer(byteValues.length * 2); for (int i = 0; i singleChar = (byte) (byteValues[i] & 0xF0); singleChar = (byte) (singleChar >>> 4); // shift the bits down singleChar = (byte...

table corrupt in mysql

My server just ran out of space recently, so I do some cleanup. Then my friend complain about several web app act abnormaly, turn out several db on mysql got table corrupt. The error sound like "Can't open file: 'TableName.MYD'. (errno: 145)" So to fix it, logon to mysql console, and type "REPAIR TABLE TableName" And don't forget to select the db first ;)

CapitalizeWords.java

I need to make my string sentence to be capitalize on each first character of word, So far haven't find such function that I can use. So made this simple class, incase someone need it. It's GPL so free to use it and modify it. import java.util.Scanner; import java.util.ArrayList; import java.util.Iterator; import java.lang.StringBuilder; /** * * @author avenpace * I'm using singleton here so, hope you know what that means ;) * license under the GPL so free to use, modify and hack whatever you want * lemme know if this programme benefit you if you had the time */ public class CapitalizeWords { private static CapitalizeWords capinstance; private CapitalizeWords() { } /** * The method will capitalizing every first character on each word on the String sentence * This method take two parameter, * @param source source sentence string that you want to capitalize on the first character if each word. * @param allword this argument...

Fucked up chaintech and ecs

My pc at home was suddenly broke like 3 month ago before I went to Zagreb. So after doing some hardware test, turn out my 7aivl chaintech without a clear reason got bios corrupt and it onboard vga died. Damn cheap mobo!!!!! So I went to computer store looking for socket A mobo and finally found it at this computer store named edicom at Harco Mangga dua. So I bought that ECS k7s5a pro. So I install it after got home, and walaaahhh.... that FUCKING brand new mobo not showing any sign of life what so ever, fuck me!!!!!! So I go back the next day to the store where I bought that damn thing, and the store technician check it and said to me that my Duron proc dead for sure.... WTF!!!!!! So I went home again, curious with that dumb technicision and check the proc my self using other mobo, and viola..... the proc running just fine, but not in ECS k7s5a pro. I leave it untouch for like 3 month coz I was in Zagreb for the whole time and ECS k7s5a pro still can't run my Duron. When I got home...
It's now 21.38 GMT+1. Tomorrow morning I'm gonna leave Zagreb and going back to Jakarta and now kinda bit snowy outside. It was really fun here and like it so far. The city is not so crowded like Jakarta not mention the geek scene here , I'm definetly gonna miss this place. Hopefully will had the change to come again and doing other FLOSS hack. Hvala Zagreb! Hvala Croatia! Hvala Mama!
Don't really bother with syntax coloring on vim 'till now So to make syntax coloring on vim, edit "/etc/vimrc" and add "syntax on set backspace=indent,eol,start"
Another notes for me, in mysql version 4, at least the one that on my SuSE 10. If I create user and give permision to do all things and assign host anything beside localhost. I wont be able to login to mysql console. And now my mysql_connect() on my php script wont work unless I use 127.0.0.1 for the db host. Dunno why, I'll figure out this later
Been while since I post my last blog and playing with php. So to remind my self about getting value from POST and GET in php. When you have url like http://lame.com/script.php?duh=ownotagain You can just straight echoing inside the script like echo $duh; Just notice that the newer php, that thing doesn't work anymore. For the url that I've mention above, that mean it use the GET method, if you want assign the duh variable to you php script, you gotto do like this $duh = $_GET['duh']; echo $duh; It then will give you ownotagain on your browser. Yeah I know.... I'm totally moron just figure that out :D Ummmm, 1,5 week again before I return home, so still have to deal with this damn cold winter Guess, I'll miss Zagreb coz this is really nice town to be around
Finally manage to put some dhtml drop down menu onto WALHI website, though till i write this it still kinda buggy when using M$ IE and work great on Firefox. I create style element script_dhtml for storing javascript and css file that used by dhtml dropdown menu. For top navbar I modify banner_menu and put javascript function inside html link tag and for left horizontal kampanye I modify the variable in subtopics_menu and change fetch section to <a class="subtopic2" href="<?=$site->uri.$topics_array[$subtopic->id];?>/" onMouseover="ddropdownmenu(this, event, <?=$subtopic->name;?>, '150px')" onMouseout="ddelayhidemenu()">&(subtopic.extra);</a> Add several new global variable on code-global so that the dhtml can get array for the subtopic. And to give subtopic array on the javascript dhtml dropdown from midgard subtopic function, I came up with following lines of code <? $campaigns_topic = mgd_list_t...
Bergie just gave me account to midgard project website and listed me in developer community section with other midgarders. Really cool coz I had a change to try out some MidCOM there. Here is link for midgard developer community : http://www.midgard-project.org/community/whoswho/
WALHI need to make sub website for sahabat WALHI (WALHI's volunter community). We want to use our separate Midgard based system for that. There's a lot facilities that we've think that we want to put to there like forum, chatroom, pooling stuff and membership. I'm still thinking how can I put all that stuff to our Midgard System.
Wrote port scanner in java named Jawascan back in 2003. It only use simple handshaking concept between one port to another. Jawascan use standard networking JDK API. So it is very simple port scanner, it wont be powerfull utility like nmap or anything like it. Made it just for fun. You can download it at http://vc-digital.com/Jawascan.zip
Made database connection class for my project that using mysql jdbc. I'm putting the code here incase anyone may find it usefull. Or you can download it from http://vc-digital.com/ConnectionDB.java /* * Created on March 25, 2005 * */ package sim; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.sql.*; import java.util.Scanner; import java.lang.String; /** * This source code is license under GPL * Still working on password encryption * You may use it, hack it and do what ever you want but please put my name as a credit if you * are using this code for your application... * If you find this code usefull for you please donate to the poor and homeless in your * hood... giving to others will make you a better person. Trust me... * Author o3ng. Contact me for any suggestion or question at avenpace@gmail.com * */ class ConnectionDB { private String [] cfg, cfgx; p...