tag:blogger.com,1999:blog-101916822024-03-13T18:58:31.468+08:00OpenSource@workmagenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.comBlogger78125tag:blogger.com,1999:blog-10191682.post-45411547720686198112019-05-18T20:25:00.001+08:002019-05-18T20:31:42.400+08:00Mapping docker volumeStarting to learn docker and encountered some issues when mounting volumes to my container. Had to tweak the commands using a mix of what I can find online as the commands I used online couldn't work for my system which is a windows 10.<br />
<br />
<br />
Steps you need to do if you are in the same situation as me. In my case, I wasn't able to find my volume as well even following the path after inspecting the volume.<br />
<br />
<br />
1. Enable drive sharing through the settings in the whale icon at the bottom right corner.<br />
<br />
2. Use the following command to map host folder to container folder of your choice<br />
(For some reason I have to also attach my container again otherwise it doesn't work.)<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">$ docker run -d -it --name someContainer \</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> -v "D:/projects/testData":/tmp someImage</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">$ winpty docker attach someContainer </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">$ # ls tmp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span>
(Whatever files you have put in testData folder should show up here and vice versa)<br />
<div>
<br /></div>
<div>
Notes:</div>
<div>
- winpty is required in windows otherwise it can't run. Anyway you will be prompted. </div>
<div>
- perhaps there is a better way or i need to do something about my configs, but for now this works for me. </div>
magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-37717116689027492542014-12-13T13:37:00.001+08:002014-12-13T13:37:36.323+08:00The new Android Studio and intel HAXM<span style="font-family: Verdana, sans-serif;">Hola! It's been a long time since I have blogged anything. Well, let's not make any promises, I actually just wanted to document some stuff I was doing, so might as well do it here and try to stop being a lazy ass.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">The new Android Studio is really cool, and I decided to try it out since I have not touched ADT eclipse for a long time anyways. But right now, <a href="http://developer.android.com/">http://developer.android.com/</a> looks like this: </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-Cx8Qmm-6atA/VIvLFKOGDPI/AAAAAAAAAqI/vnqHlUKQkMQ/s1600/meh.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-Cx8Qmm-6atA/VIvLFKOGDPI/AAAAAAAAAqI/vnqHlUKQkMQ/s1600/meh.JPG" height="213" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">That is so not cool Google. It's bad!! So that's why I am here actually, wasting time, waiting for the page to come back alive so I can continue with their tutorials. Trying to learn something shouldn't be this hard! Trying to get in on the #HourOfCode and sh*t. heh heh.</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<span style="font-family: Verdana, sans-serif;">So I had previously used the old Android Studio, and it kept saying it couldn't find the SDK, so I was pretty miffed and left it for a while. Then I tried redownloading the Android Studio again, and pow wow, there was a new snazzy Android Studio. </span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><a href="http://4.bp.blogspot.com/-hklRM3n4CHw/VIvMRg9KEcI/AAAAAAAAAqU/SHM-r3UQCbc/s1600/android_studio.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-hklRM3n4CHw/VIvMRg9KEcI/AAAAAAAAAqU/SHM-r3UQCbc/s1600/android_studio.JPG" height="212" width="400" /></a></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">I like it, I do, but the emulator was super duper slow.. :( So after some googling, found out about the Intel HAXM thingy to help make it faster. </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">Get it here if you are having similar issues: <a href="https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager">https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager</a></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">Or you could use the SDK Manager to install it, but apparently it LIES! It will say that it is apparently installed:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><a href="http://2.bp.blogspot.com/-Iq4ZNEzRe20/VIvNJt4yUVI/AAAAAAAAAqg/TVLK-9so-mc/s1600/intel_haxm.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-Iq4ZNEzRe20/VIvNJt4yUVI/AAAAAAAAAqg/TVLK-9so-mc/s1600/intel_haxm.JPG" height="228" width="320" /></a></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">But it really isn't, it's just downloaded, so you would have to search high and low for it. So don't bother, just download from the link above. Once you have downloaded it, double-click to install and if you hit a popup that says something about virtualization, then you would have to enable it in your BIOS.</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">So restart your computer(annoying - I know.) and get into the BIOS and look for "Virtualization Technology", and enable it. Then once you are back in Windows, then try installing the HAXM again. </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">After installing that, I found I had to restart Android studio as well, and even then, it was a bit better, but still had issues. I restarted the virtual device several times, but it seemed to be getting worse. </span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">I found that apparently my device did not stop properly, and so I had to clear the locks on it. To do that, I removed all .lock files:</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><a href="http://3.bp.blogspot.com/-zcRcp3pmUGc/VIvPeqAjvdI/AAAAAAAAAqs/qwh4ARd4UVQ/s1600/avd_locks.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-zcRcp3pmUGc/VIvPeqAjvdI/AAAAAAAAAqs/qwh4ARd4UVQ/s1600/avd_locks.JPG" height="225" width="320" /></a></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;">Another thing that helped, was to wipe the user data before I ran the virtual device:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: Verdana, sans-serif;"><a href="http://1.bp.blogspot.com/-djcPzDn6p9s/VIvP5H-4FwI/AAAAAAAAAq0/Hk_WP_5V2OY/s1600/wipe_data.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-djcPzDn6p9s/VIvP5H-4FwI/AAAAAAAAAq0/Hk_WP_5V2OY/s1600/wipe_data.JPG" height="99" width="320" /></a></span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="font-family: Verdana, sans-serif;"><br /></span></div>
<br />
<span style="font-family: Verdana, sans-serif;">As you can see, it says that the size on disk is 1 gigantous GB! When I started, it was only about 700 MB. So clean your disks people, it helps. After that, it was much smoother. Of course I haven't tested enough, but hopefully it stays this way. Subsequent deployment of apps was pretty fast.</span><br />
<span style="font-family: Verdana, sans-serif;"><br /></span>
<span style="font-family: Verdana, sans-serif;">Ahh, the page is back alive!</span>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-78956827522080116032012-10-26T13:52:00.001+08:002012-10-26T13:52:51.404+08:00Joomla and AkeebaSo there I am, having installed joomla (both versions 2.5 and 3), and trying to get <a href="https://www.akeebabackup.com/products/akeeba-subscriptions.html">Akeeba Subscriptions</a> to work. It is an awesome product, I don't mean it's not, just that somehow I couldn't get it to work, my users were not being added to the subscribed groups. I read and re-read the documentation several times, and followed the instructions, but still it's not working, until now, when I changed one of the configurations on access levels.<br />
<br />
It was really frustrating, and I didn't want to email Akeeba over this as it seemed like IT WORKED FOR EVERYONE. So I thought it must be something I was doing wrong! And it was, but thought it would have been good if there was a more detailed documentation. Maybe it's just me or the new generation syndrome, everything needs to be spelt out hurhur. Anyway, for all the rest of the lazy bums like me, if you are having a similar problem with the user groups ACL in joomla for Akeeba, here's a visual mini tutorial.It is similar to what is described in the documentation given in the Akeeba documentation, but with a little of my addons.<br />
<br />
This article assumes you are fairly familiar with Joomla.<br />
<br />
1. Under <i>User Manager: User Groups</i>, create a user group called <i>Subscribers</i><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-BsAQdFKkgqI/UIodOto-dzI/AAAAAAAAAG8/QSzSuB17go8/s1600/subscribers.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="158" src="http://3.bp.blogspot.com/-BsAQdFKkgqI/UIodOto-dzI/AAAAAAAAAG8/QSzSuB17go8/s320/subscribers.png" width="320" /></a></div>
<br />
2. Click on <i>Viewing Access Levels</i> and click <i>New</i> to create a new viewing access level.<br />
a. Fill in the level title as<i> Premium Content</i><br />
b. Select the user group that you have previously created, <i>Subscribers</i>.<br />
c. Click Save and close<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-9aY_Y7hKRiI/UIoeHokt31I/AAAAAAAAAHE/Jd1tlS4WbLM/s1600/view_access_level.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="http://3.bp.blogspot.com/-9aY_Y7hKRiI/UIoeHokt31I/AAAAAAAAAHE/Jd1tlS4WbLM/s320/view_access_level.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
3. Once you have done the above, you can go ahead to set your selected content to the the View Access Level Premium Content. An example is shown below:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-NtvaKn5duwU/UIof0Z9axBI/AAAAAAAAAHM/O8WELauWoQ4/s1600/premium_article.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195" src="http://4.bp.blogspot.com/-NtvaKn5duwU/UIof0Z9axBI/AAAAAAAAAHM/O8WELauWoQ4/s320/premium_article.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
4. Now we will move on to creating the subscription levels in Akeeba. Go to the Akeeba component and select<i> Setup>Subscription Levels</i>. Click<i> New</i>. To keep it simple, I will just be creating a free subscription.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-x_TnbvdL4yY/UIojHKMUltI/AAAAAAAAAHc/6fkVrPQlJsY/s1600/subscription_level.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="155" src="http://3.bp.blogspot.com/-x_TnbvdL4yY/UIojHKMUltI/AAAAAAAAAHc/6fkVrPQlJsY/s320/subscription_level.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
5. Now comes the part that I had been tearing my hair over. As you can see later, it was really a very minor thing I missed out on. Note the circled part, leave it as <b>PUBLIC</b>. I went on and changed it to something else and hence it didn't work. Go to <i>Extensions > Plugin Manager</i>, click on the <i>Akeeba Subscriptions - Joomla! Usergroups Integration. </i><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-SMZ7hx5xTiM/UIokbIk0lII/AAAAAAAAAH0/bgpvloiJwHQ/s1600/plugin.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="86" src="http://2.bp.blogspot.com/-SMZ7hx5xTiM/UIokbIk0lII/AAAAAAAAAH0/bgpvloiJwHQ/s320/plugin.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
6. Add a subscription link to your menu. You can choose to select multiple types of subscriptions</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-B7ivLe74FPI/UIojevszmhI/AAAAAAAAAHs/bjLCcLC-1v4/s1600/subscribe_page.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="139" src="http://1.bp.blogspot.com/-B7ivLe74FPI/UIojevszmhI/AAAAAAAAAHs/bjLCcLC-1v4/s320/subscribe_page.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
And that's it! Now you can try to login as a user and test your subscription to see if it works. </div>
<div class="separator" style="clear: both; text-align: left;">
Hope this helps someone out there, and thanks to Akeeba for creating an awesome product!</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-55461941811612061742011-07-19T14:30:00.001+08:002011-07-19T14:31:50.002+08:00Working with JavaScript frameworks<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">Currently working on extjs4 for a project at work. I have to admit that though extjs4 is pretty, the documentation really drives me nuts. I had contemplated dropping down to extjs3 as the tutorials seem to be more common, but in terms of the pretty factor, extjs3 can't compare. Also, the code required to do something similar in extjs 3 vs extjs4 is quite different in some cases. As in less lines of code. I love that sort of thing.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">I guess I will try to document the problems I face here, and perhaps later will write a mini tutorial(maybe contribute to the examples in sencha?) We'll see.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><u>Some quirks here:</u></span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">- When passing my data as json, I had to remove the quotes from the data that I meant as numbers, in particular for my case, float. And how I did that was to force the type in my php code before I spat out the data. Not sure why that behaviour, but this caused me a lot of trouble in my chart. I just couldn't get the points to map correctly until I did that.</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"><br />
</span><br />
<span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;">- When using the type 'Time' for my chart, I have to define my fields in the model as</span><br />
<div style="text-align: center;"><span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;">fields: [{name: 'date', type: 'Date'}, {name: 'close',type:'float'}]</span></div><div style="text-align: center;"><span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;">vs just </span></div><div style="text-align: center;"><span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;">fields: ['date', 'close'] (This worked for my other models.)</span></div><span class="Apple-style-span" style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 18px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; line-height: 18px;">So the above is what I can remember offhand, Will add to it when I have time again.</span></span><br />
<span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;"><br />
</span>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-68769775487296278422011-06-10T03:26:00.002+08:002011-06-10T03:26:36.679+08:00<div class="separator" style="clear: both; text-align: center;">Another of my nonsense drawing... </div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-PihGJ7ULdQM/TfEeT3QHakI/AAAAAAAAAEA/x9W5j3FYHrc/s1600/g4044.jpg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-PihGJ7ULdQM/TfEeT3QHakI/AAAAAAAAAEA/x9W5j3FYHrc/s1600/g4044.jpg.png" /></a></div>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-3591131583841007792011-06-10T02:29:00.000+08:002011-06-10T02:29:24.026+08:00Well I know in my last post I said that I would write more about my development with Android... I did do up a couple of apps, but well, documentation, have not really gotten down to it :p<br />
<br />
Anyways, I'd just like to really say wow about Audacity. I know its been around for a long time, but have not really used it... till lately when I needed it for a small project. It's just way cool and really kudos to those who have contributed to that project. I'm not an expert in sound, but the folks at Audacity have made it so easy to use. Do try it out if you need some kind of a sound editor. <a href="http://audacity.sourceforge.net/">http://audacity.sourceforge.net/</a><br />
<br />
I've also been using this other software called MediaCoder ( <a href="http://www.mediacoderhq.com/">http://www.mediacoderhq.com/</a> ). Been using it to convert formats and also to extract the sound from videos. Pretty cool.magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-64424327530959887332011-04-26T16:55:00.002+08:002011-04-26T16:58:05.661+08:00So I've gotten my hands dirty on the android phone, and think I might be writing a little tutorial on it. I used phonegap, jquerymobile, html5, and eclipse as the IDE. Also been messing around with Mr Android drawings :D well till later when I have the time to write the tutorial!magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-58675150667991109672010-03-25T23:11:00.006+08:002010-03-25T23:30:37.462+08:00Introducing my little giraffe... inkscaped!<div style="text-align: center;"><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6GcMov1txRM/S6uBJeSQnkI/AAAAAAAAADM/a0pjWubOu0c/s1600/text3773.png"></a><div>Been playing around with inkscape as mentioned earlier, and I quite like this tutorial as it was pretty simple. </div><br /><br /><div><br /><div style="text-align: center;"><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/G0EZBa9rD1U&hl=en_US&fs=1&"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed src="http://www.youtube.com/v/G0EZBa9rD1U&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object><br /></div><div style="text-align: center;"><br /></div><div style="text-align: left;">So after the tutorial, I followed it as closely as I could (although I did use some different techniques), and this is the result..</div><div style="text-align: center;"><br /></div><div style="text-align: center;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><img src="http://3.bp.blogspot.com/_6GcMov1txRM/S6uBJeSQnkI/AAAAAAAAADM/a0pjWubOu0c/s320/text3773.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5452593773610573378" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 320px; height: 278px; " /></span></div><div><span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "><br /></span></div><div><span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; ">Well I improvised a bit for the eyes lol </span></div><div style="text-align: center;"><br /></div><div style="text-align: left;">And here is my first little inkscaped version of my little soft toy giraffe. Her name is 'YoYoYo'. Yes, that's not a joke. :)</div></div><div><br /></div><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6GcMov1txRM/S6t9byBl1pI/AAAAAAAAADE/EKO54cvIrW8/s1600/text3902.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 303px; height: 320px;" src="http://2.bp.blogspot.com/_6GcMov1txRM/S6t9byBl1pI/AAAAAAAAADE/EKO54cvIrW8/s320/text3902.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5452589690100504210" /></a><br /><br /><div>There's still room for improvement of course, and it took me too damn long to do it too :p And I know, it's a giraffe, but hey why is the neck so short, and what happened to the leggys??? Well, my soft toy really looks like that... take it as an alien giraffe? Hopefully I will continue to have inspiration!<br /><div><br /></div><div><br /></div></div>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-65858882221610687502010-03-19T11:42:00.002+08:002010-03-19T11:44:13.253+08:00swirly whirlyI made some swirlies using <a href="http://www.inkscape.org/">inkscape</a>, and there you have it, a header for my blog. Been a long time since I used Inkscape properly, and that's my first proper attempt with the swirlies :Dmagenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-43444793172812758172010-03-09T20:27:00.004+08:002010-03-09T20:36:57.530+08:00Red Hat with Virtual Box<div style="text-align: left;">Well it's been a long time since I've updated this blog. Truth be told, I kinda forgot about it till we went through some stuff that I did long time ago in this Red Hat course that I am attending currently. I'm a lazy bugger :p</div><div><br /></div><div>So anyway, been reviewing lotsa stuff that I've kind of forgotten, and learning new things, so it's all good. Currently I am using <a href="http://www.redhat.com/">Red Hat</a> on <a href="http://www.virtualbox.org/">Virtual box</a> as practice at home since I don't have a Linux machine at home.</div><div style="text-align: center;"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "><span class="Apple-style-span" style="-webkit-text-decorations-in-effect: underline; "><img src="http://www.redhat.com/g/chrome/logo_rh_home.png" border="0" alt="" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 96px; height: 31px; " /></span></span></div><div style="text-align: left;">Red Hat's pretty cool, but I think I still like Fedora simply for the fact that it's not commercial. But anyway, since I am going to take the exam for RHCT, then I have to be familiar with red hat. I know I should've taken RHCE, but well I was kinda volunteered into this whole thing. I just don't like exams you know. I like to play around with stuff, but exams... oh well, wish me luck :)</div>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-75027782750030554702008-08-28T16:01:00.003+08:002008-08-28T16:06:15.600+08:00Web servicesFor the purpose of my work, I also have to look into web services. I have to admit, that while I've looked at quite a couple of technologies, I have not actually set up a web service before. I will attempt to, but first I gotta learn more about it. So here's some definitions taken from all over.<br /><br />As taken from the <a href="http://www.w3.org/TR/ws-arch/#id2260892">W3C Working Group</a><br /><blockquote></blockquote><blockquote> [<a name="wsdef" id="wsdef" title="Web service">Definition</a>: A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.]</blockquote><br /><br />As taken from <a href="http://en.wikipedia.org/wiki/Web_service">wikipedia</a><br /><p></p><blockquote><p>The <a href="http://en.wikipedia.org/wiki/W3C" title="W3C" class="mw-redirect">W3C</a> Web service definition encompasses many different systems, but in common usage the term refers to <a href="http://en.wikipedia.org/wiki/Client_%28computing%29" title="Client (computing)">clients</a> and <a href="http://en.wikipedia.org/wiki/Server_%28computing%29" title="Server (computing)">servers</a> that communicate using <a href="http://en.wikipedia.org/wiki/XML" title="XML">XML</a> messages that follow the <a href="http://en.wikipedia.org/wiki/SOAP" title="SOAP">SOAP</a> standard. In such systems, there is often machine-readable description of the operations offered by the service written in the <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language" title="Web Services Description Language">Web Services Description Language</a> (WSDL). The latter is not a requirement of a SOAP <i>endpoint</i>, but it is a prerequisite for automated <a href="http://en.wikipedia.org/wiki/Client-side" title="Client-side">client-side</a> code generation in many <a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29" title="Java (programming language)">Java</a> and <a href="http://en.wikipedia.org/wiki/Microsoft_.NET" title="Microsoft .NET" class="mw-redirect">.NET</a> SOAP frameworks (frameworks such as <a href="http://en.wikipedia.org/wiki/Spring_framework" title="Spring framework" class="mw-redirect">Spring</a>, <a href="http://en.wikipedia.org/wiki/Apache_Axis2" title="Apache Axis2">Apache Axis2</a> and <a href="http://en.wikipedia.org/wiki/Apache_CXF" title="Apache CXF">Apache CXF</a> being notable exceptions). Some industry organizations, such as the <a href="http://en.wikipedia.org/wiki/WS-I" title="WS-I" class="mw-redirect">WS-I</a>, mandate both SOAP and WSDL in their definition of a Web service.</p> <p>More recently, <i><a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" title="Representational State Transfer">RESTful Web services</a></i> have been regaining popularity. These also meet the W3C definition, and are often better integrated with <a href="http://en.wikipedia.org/wiki/HTTP" title="HTTP" class="mw-redirect">HTTP</a> than SOAP-based services. They do not require XML messages or <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language" title="Web Services Description Language">WSDL</a> service-API definitions.</p></blockquote><p></p><br /><blockquote></blockquote>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-24629857964167528362008-08-20T14:13:00.003+08:002008-08-20T14:24:16.986+08:00Google mapsahh, finally, I am made to work with google maps. Should be interesting, just that with other stuffs going on, never found the time. So here I shall start my little own documentation on how I'm progressing with the google map app thingy.<br /><br />http://code.google.com/apis/maps/magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-59176921985978448702008-05-22T15:13:00.002+08:002008-05-22T15:14:57.828+08:00PILSome of my students had problems installing PIL with python on their windows XP. Something about python being compiled by a VS compiler. Anyway, managed to resolve the issue by downgrading to python 2.4 and using PIL 2.4 as well.magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com1tag:blogger.com,1999:blog-10191682.post-51978368111692804562008-04-09T16:13:00.002+08:002008-04-09T16:42:45.988+08:00Useless?Just found this website while looking around resources for python. It's pretty funny, and kind of useful in my opinion! Check it out <a href="http://www.uselesspython.com/index.php">useless python</a>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-72128328433159552082008-04-09T09:09:00.005+08:002008-04-09T16:42:24.438+08:00Pythonahh so I've gotten lazy in updating this blog, but nvm I can start again!<br /><br />Regarding Django, I've found it relatively easy to use. And of course, once one gets the hang of it, it is easier, but when you are just starting to learn it, the learning curve can take a while. Perhaps it is because I was also not familiar with python then.<br /><br />For work reasons, I have to be familiar with python now, so anyway I helped a friend out to parse some stuff out from the web. Had intended to use perl as I really like perl's regex, but thought I might as well try python to finally know how to use it :p Anyway, I found this neat little tool <a href="http://pyparsing.wikispaces.com/">pyparsing</a> and also learnt more about python's regex.<br /><br />I still prefer perl's regex..... or maybe cos I've been using it for so long so I'm biased. But anyway nvm, I need to learn to like python... for a few months at least hahahamagenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-88080473151627026842007-10-16T16:22:00.000+08:002007-10-16T16:24:03.870+08:00CatalystI've been trying out Django, so I was thinking, I wanted to try out the webframework for perl too, so I poked around and found Catalyst. Still in the midst of testing it.. and so far... it still seems a little unfrenly.......... but we'll see, I will update about it again.magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-87792328530097654872007-10-05T21:25:00.000+08:002007-10-05T21:42:08.431+08:00Bulk resize with pythonRecently I had to pick up python for a project. So as usual, it is easier and more fun for me to learn something if there is a purpose! So this time, since I'd been messing around with a new camera, I wanted to have something to bulk resize my pics. So I decided to write a script for it. And so here it is!<br /><blockquote><pre>import Image, os<br /><br />def make_smaller(path):<br /> for item in os.listdir(path):<br /> try:<br /> image = Image.open(item)<br /> image.thumbnail((583,389), Image.ANTIALIAS)<br /> print 'Resizing: '+item<br /> image.save('small/'+item)<br /> except IOError: None<br /><br />make_smaller('/home/widdlepuke/Desktop/Python module installers/test')<span style="font-family:courier new;"></span></pre><br /></blockquote>Very simple, and I must say, I do kinda like python now. I still like my perl though :p I am also currently messing with the Django framework. More on that next time.magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-70809797201721570172007-09-19T16:04:00.000+08:002007-09-19T16:20:52.105+08:00Attempt to install modperlRecently I attempted to install mod_perl on my FC5 at home. Unfortunately, it ended up with my internet connection screwing up. Ndiswrapper got messed up and I was in a funk, so I delayed a time before getting down to work on it. So I reinstalled ndiswrapper, thinking it might have been corrupted, but I ended up with my fedora giving me panic attacks!!!<br /><br />It was quite a pain, and of cos seeing those panic warnings made me panic a little too! Then I tried recompiling it and so on and stuff, still failed. In the end, I took a closer look at my error messages, and realised that there was a conflict with my kernel info in grub. I didn't take down the error messages, but it was something about the kernel not being suitable for wireless settings. (I was on a wireless connection) So I checked, and to my surprise, my grub looked.. grubby. It wasn't what I had put in earlier.. and there's a blog entry here to prove it since I did record down how I setup my wireless connection in this blog. So I suppose something I did when I tried to install modperl screwed it up, and I ended up loading a different kernel from what I expected. So I just changed it back to the original and then my ndiswrapper was happy!<br /><br />So it was alright then, in about 2 hours or so. I haven't got my modperl working though, kinda busy to work on it, but I'll try to do it, and will update here in time :pmagenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-30462348973255901122007-08-29T14:42:00.000+08:002007-08-29T15:56:00.230+08:00SubversionI recently set up a subversion server for my institution. I had set one up a long time ago, but this is a different server. So had to revisit some stuff. So I guess I should document some of the stuff in case I forget them again.<br /><br />So first of all, I have to create the repository. In my case, I put it in <span style="font-style: italic;">/svn/repository </span>and I <span style="font-weight: bold;">create my repository</span> there.<br /><br /><span style="font-family:courier new;"># svnadmin create bankapps initenv</span><br /><br /><br /><span style="font-weight: bold;">Settings for SUBVERSION in httpd.conf</span><br /><br /><span style="font-family:courier new;">1:<location> </location></span><span style="font-family:courier new;"><Location /svn/bankapp > </span><span style=";font-family:courier new;font-size:78%;" >-->the parameters you put in your url</span><br /><span style="font-family:courier new;">2: DAV svn</span><br /><span style="font-family:courier new;">3: SVNPath /svn/repository/bankapp </span><span style=";font-family:courier new;font-size:78%;" >-->the actual path to your repository</span><br /><span style="font-family:courier new;">4: AuthzSVNAccessFile /svn/users/users </span><span style=";font-family:courier new;font-size:78%;" >-->the path to your user access list</span><br /><span style="font-family:courier new;">5: Require valid-user</span><br /><span style="font-family:courier new;">6: AuthType Basic</span><br /><span style="font-family:courier new;">7: AuthName "Bank Applications Development"</span><br /><span style="font-family:courier new;">8: AuthUserFile /etc/svn-auth-file </span><span style=";font-family:courier new;font-size:78%;" >-->the path to your password file<br /><span style="font-size:100%;">9: </span></span><span style="font-family:courier new;"></Location > </span><location></location><br /><br /><br />Lines 2 and 3 are the required lines for this to work, you may omit the rest if you want to allow public access.<br /><br />In the <span style="font-weight: bold;">user access list</span>, you have to create a file, and in the file, it should look something like this:<br /><span style="font-family:courier new;"><br />[bankapps:/]</span><br /><span style="font-family:courier new;">maggie = rw</span><br /><span style="font-family:courier new;">user1 = rw</span><br /><br /><span style="font-family:courier new;">[/]</span><br /><span style="font-family:courier new;">maggie = rw<br /><br /></span>And, for your <span style="font-weight: bold;">password file</span>, you also need to create it, using htpasswd:<br /><span style="font-family:courier new;"><span># htpasswd -c passfile user</span></span><br /><br />You will then be prompted to create a password. Subsequently, you may <span style="font-weight: bold;">add more users</span>:<br /><span style="font-family:courier new;"># htpasswd -b passfile user password<br /></span><br />Then you have to restart your apache<br /><span style="font-family:courier new;"># ./httpd -k restart<br /><br /><span style="font-family:georgia;">Now, browsing to http://yourdomain.com/svn/bankapp should prompt you a password and allow you to browse the files inside.<br /><br />To upload and do stuff, get the tortoisesvn, it's rather userfriendly! <a href="http://tortoisesvn.tigris.org/">http://tortoisesvn.tigris.org/</a><br /><br /><br /></span></span>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-1158071076934654842006-09-12T22:22:00.000+08:002006-09-12T22:24:36.953+08:00FC5 and jreWas trying to get my java runtime environment working in FC5, thanks to this excellent guide, I managed to get it up really fast. <a href="http://www.mjmwired.net/resources/mjm-fedora-fc5.html#java">http://www.mjmwired.net/resources/mjm-fedora-fc5.html#java </a><br /><br />They have more resources than just on jre, so take a look at it. But in case they remove it anytime in the near future, I am pasting the guide to setting up jre:<br /><br /><pre><u>1 March 2006</u><br /><br /><b><u>NOTE:</u></b> Fedora Core 5 <b>advises AGAINST</b> using the Sun Java RPM.<br />Information can be found in the <aa href="http://fedora.redhat.com/docs/release-notes/fc4/#id2503931" target="_blank">FC5 Release Notes on Java</aa> since the RPM may be<br />overwritten by a 'yum update' due to similar package names.<br /><br />However if you do NOT use the FC5 Java packages, this should not affect you.<br /><br />URL: <a href="http://java.sun.com/j2se/1.5.0/download.jsp" target="_blank">http://java.sun.com/j2se/1.5.0/download.jsp</a><br /><br />Choose the LATEST JRE Update, currently 6:<br /><br />JRE 5.0 Update 6 includes the JVM technology<br /> The J2SE Runtime Environment (<b>JRE</b>) allows end-users<br /> to run Java applications. More info...<br /> Download <b>JRE</b> 5.0 Update 6<br /><br />Make sure to (*) Accept License Agreement<br /><br />Choose:<br /><br />Linux Platform<br />Linux self-extracting file (jre-1_5_0_06-linux-i586.bin, 15.99 MB)<br /><br />Run:<br />[root@charon fc5]# sh ./jre-1_5_0_06-linux-i586.bin<br />(type 'yes')<br />[root@charon fc5]# mv -f jre1.5* /opt/jre1.5<br />[root@charon fc5]# ln -s /opt/jre1.5/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so<br /><br /><br />(If you update the JRE package, simply delete the /opt/jre1.5 directory and<br />copy the update to /opt/jre1.5 -- there will be no need to update the 'ln' link.)<br /><br />---<br /><br /><b><u>Controlling Java through 'alternatives'</u></b>. When running the 'java' command,<br />FC5 will automatically pick the GNU Java, to use Sun's java do the following:<br /><br />[root@charon fc5]# /usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.5/bin/java 2<br />[root@charon fc5]# echo 2 | alternatives --config java<br /><br />[root@charon fc5]# java -version<br />java version "1.5.0_06"<br />Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)<br />Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)<br /><br /><b><u>NOTE for SELinux User</u></b><br /><br />Users running SELinux may NOT be able to get their browser to detect<br />the plugins. Make the following changes to the SELinux policy:<br /><br />Run: system-config-securitylevel<br />Goto: SELinux > Modify SELinux Policy > Compatibility ><br /> Allow the use of shared libraries with Text Relocation<br /> Allow executables to run with executable stack</pre><span class="down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"></span>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com0tag:blogger.com,1999:blog-10191682.post-1157276364659800092006-09-03T17:13:00.000+08:002007-09-19T16:14:52.105+08:00FC 5 - Fedora Core wireless network setup with a windows driveralright, I finally changed my windows to an FC5. And therein lies the problem, my stupid wireless driver is only for windows. Nevermind that, there are solutions right? And yup, I found ndiswrapper. Seriously, bless the fella who created that tool as it must have saved many a wireless network card. Anyway, so I proceeded to install it, but there were lots of tweaking to do. So this is what I have done, hopefully it helps some other poor soul.<br /><br /><span style="font-weight: bold;">1. Login as root, and type this command</span><br /># su -<br />(Frankly speaking, I don't know why I had to do this, but if I didn't, ifconfig and such commands won't work.)<br /><br /><span style="font-weight: bold;">2. Ensure that you have the kernel-devel RPM suitable for your kernel. You can check this by using this command</span><br /> # cd /usr/src/kernels (If you do not have any, most likely you wouldn't even have the kernels folder.)<br /><br />Assuming that you do not have it installed..(if you do, skip to...step 8)<br /><span style="font-weight: bold;">3. Check your kernel version</span><br /># uname -rm<br /><br /><span style="font-weight: bold;">4. Proceed to look for the correct kernel-devel RPM</span><br />Note: The default stack size in the original FC5 kernel is only 4K, but most other external drivers like in my case, the wireless drivers, they require more, so you should update your original kernel as well.<br />Try this website<br />(<a href="http://www.linuxant.com/drivers/hsf/full/downloads-fc5-kernel-i686.php?PHPSESSID=b1775eea161ff873e65c90702b698052">http://www.linuxant.com/drivers/hsf/full/downloads-fc5-kernel-i686.php?PHPSESSID=b1775eea161ff873e65c90702b698052</a>)<br /><br /><span style="font-weight: bold;">5. When you have downloaded the correct RPMS, you can create a folder to hold them and cd into it</span><br /># rpm -ivh *.rpm<br /><br /><span style="font-weight: bold;">6. Once installed, you have to edit grub to let it know which kernel to boot up as the original kernel is still there.</span><br /># cd /boot/grub/<br /># vi grub.conf<br />.....<br /> title Fedora Core (2.6.15-1.2054_FC5.stk16smp)<br /> root (hd0,0)<br /> kernel /vmlinuz-2.6.15-1.2054_FC5.stk16smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br /> initrd /initrd-2.6.15-1.2054_FC5.stk16smp.img<br />#title Fedora Core (2.6.16-1.2129_FC5)<br /># root (hd0,0)<br /># kernel /vmlinuz-2.6.16-1.2129_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet<br /><br />As you can see, I've commented out the original grub configs, so that grub will ignore them and boot the correct kernel.<br /><br /><span style="font-weight: bold;">7. Now reboot your system, once it starts, open your terminal window and repeat step 1. Then type this to check that the correct kernel is loaded:</span><br /># uname -rm<br /><br /><span style="font-weight: bold;">8. Get your Windows wireless network card drivers.</span><br /><br /><span style="font-weight: bold;">9. Install unshield(</span><a style="font-weight: bold;" href="http://synce.sourceforge.net/synce/unshield.php">http://synce.sourceforge.net/synce/unshield.php</a><span style="font-weight: bold;">) </span><br /># ./configure<br /># make<br /># make install<br /><br /><span style="font-weight: bold;">10. cd to where you downloaded the windows driver and use unshield to extract your cab files from your driver</span><br />#mkdir tmp<br /># unshield -d tmp x data1.cab<br /><br /><span style="font-weight: bold;">11. Ensure that you have no previous installations of ndiswrapper</span><br /># make uninstall<br /># make distclean<br /><br /><span style="font-weight: bold;">12. Download and install the latest ndiswrapper</span><br /># make<br /># make install<br /><br /><span style="font-weight: bold;">13. cd to the tmp folder we created earlier in the windows driver directory and look for an INF file.</span><br /># ndiswrapper -i <filename>.inf<br /># ndiswrapper -l (To check if the driver is there)<br /><br /><span style="font-weight: bold;">14. Edit the modprobe.conf file</span><br /># vi /etc/modprobe.conf<br />Add "alias wlan0 ndiswrapper" to the top of the file and make sure there is an extra line at the bottom of the file. Save and close.<br /><br /><span style="font-weight: bold;">15. Load the ndiswrapper.</span><br /># modprobe ndiswrapper<br /><br /><span style="font-weight: bold;">16. To check if ndiswrapper has been loaded, do this:</span><br /># dmesg<br /><br /><span style="font-weight: bold;">17. Now, to configure your network card. Go to System > Administration > Network</span><br /><br /><span style="font-weight: bold;">18. Click New and select wireless as your device type.</span><br /><br /><span style="font-weight: bold;">19. After clicking "Forward", you should see ndiswrapper as one of the wireless card to configure. Select it and the rest of the configurations will depend on your own wireless network.</span><br /></filename>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com1tag:blogger.com,1999:blog-10191682.post-1156151645750357902006-08-21T17:12:00.000+08:002006-08-22T08:46:01.286+08:00Cool websitesJust discovered this websites and pasting the links here first so I don't forget shall check it out later..<br /><br />http://www.openwall.com/<br />http://www.unixgeeks.org/<br />http://www.spidynamics.com/spilabs/js-port-scan/magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com1tag:blogger.com,1999:blog-10191682.post-1155367228353970632006-08-12T15:16:00.000+08:002006-08-12T15:32:19.576+08:00$@%I have no idea why I enjoy coding in funny symbols. But anyway, here's a link to the source of the that started it all! It has a couple of translations, so if you need it or want to add to it, check this out.<br /><br /><span style="font-weight: bold;font-size:100%;" ><a href="http://regex.info/">Mastering Regular Expressions</a></span><br /><br />As its author says, "it's not just for perl" programmers, but in my opinion, it's best in done in perl hehehehe :p<br /><br /><span style="font-size:85%;"><a style="font-weight: bold;" href="http://regex.info/"> </a></span>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com1tag:blogger.com,1999:blog-10191682.post-1150251751256174782006-06-14T10:14:00.000+08:002007-09-19T16:15:59.912+08:00mambowiki on Joomla anonymous access problemSo I have been working on this website, and it is running Joomla on it. So I installed mambowiki as well as I thought it'd be cool to have a wiki there with tutorials and stuff on it where people can read and edit, etc. But there was a problem with the access controls in mambowiki. I wanted to allow anonymous users to be able to view the stuff on the wiki as well, but trying to set that configurations through the admin page is useless. Googling around did not help much either, I am not sure if I am an isolated incident hmm.<br /><br />I tried a fix that I found from somewhere, it said to either remove or add this line: $wgDisableCookieCheck = true;<br /><br />But this did not seem to have any effect on my system. Then I decided to look through some of the codes to figure out how it worked, and maybe I will get lucky, and I did. So here is my fix, hopefully it works for anyone who might encounter similar problems.<br /><span style="font-size:100%;"><br />1. Go to your components/com_mambowiki folder and open mambowiki.php<br /><br />2. Scroll down the code and look for this line:<br /></span><span style="font-weight: bold;font-family:courier new;font-size:100%;" > $AllowAnonymousAccess = $params->get('allowanonymoususers', 1);<br /> // Default = no (as in Yes=0, No=1)</span><span style="font-size:100%;"><br /><br />3. Change the '1' to '0'.<br /></span><span style="font-family:courier new;"><span style="font-size:100%;"><span style="font-weight: bold;"> $AllowAnonymousAccess = $params->get('allowanonymoususers', 0);</span><br /><span style="font-weight: bold;"> // Default = no (as in Yes=0, No=1)</span><br /><br /></span></span><span style="font-size:100%;">That's it, anonymous users should be able to view your website now, whether they can edit or not will be set in your admin configs.</span>magenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com3tag:blogger.com,1999:blog-10191682.post-1149002592267124382006-05-30T23:00:00.000+08:002006-05-30T23:44:46.853+08:00Fedora Core 5 - Pirut (Software Package Manager)Well today I was preparing some materials for a workshop tomorrow. And I was googling around to find out how to use Fedora Core 5's gui Package Manager. The unfortunate thing was that we were unable to connect the laptops we prepared to the school's network. Meaning, NO INTERNET ACCESS! So fine, we thought we can just install packages from the discs.<br /><br />But therein lies Fedora Core 5's quirk. It's software package manager, aka 'pirut' only retrieves software through online repositories! So whenever I tried to use the gui package manager, it just threw me some error which did not even tell me the problem. So googling around, thanks to several forums, I found out that the problem was this strange characteristic of pirut. So how to fix this? Googled again, but only one blog talked about getting it fixed, but did not exactly state how. There was also another website that gave quite detailed steps, but again, it was apparently not tested yet. So fine, I had to just mess around, with only a few hours to go. In the end, this is what I came up with. I hope it helps anyone else who has this problem.<br /><br />1. Create a directory to hold the rpms.(I put mine in /tmp)<br /><span style="font-weight: bold;"> </span><span style="font-weight: bold;font-family:courier new;" ># mkdir -p /tmp/RPMS</span><br /><br />2. Change directory to the repository folder<br /> <span style="font-weight: bold;font-family:courier new;" ># cd /tmp/RPMS</span><br /><br />3. Create directories to temporarily mount the discs<br /> <span style="font-weight: bold;font-family:courier new;" ># mkdir disc1 disc2 disc3 disc4 disc5</span><br /><br />4. Insert disc 1 and mount it<br /> <span style="font-weight: bold;font-family:courier new;" ># mount -r -o loop /dev/hdb disc1</span><br /><br />5. Copy the RPMS from the mounted directory(disc1) to our current directory<br /> <span style="font-weight: bold;font-family:courier new;" ># cp disc1/Fedora/RPMS/* .</span><br /><br />6. Copy comps.xml as well<br /><span style="font-weight: bold;font-family:courier new;" > # cp disc1/repodata/comps.xml .</span><br /><br />ok, here you gotta wait a while<br /><br />Basically you do steps 4 and 5 again until all the 5 discs are done if you wish to install packages from all 5 discs.<br /><br />7. Once you are done, unmount and remove the files.<br /><span style="font-weight: bold;font-family:courier new;" > # umount disc1 disc2 disc3 disc4 disc5</span><br /><span style="font-weight: bold;font-family:courier new;" > # rmdir disc1 disc2 disc3 disc4 disc5</span><br /><br />8. Now to create the repository metadata<br /><span style="font-weight: bold;font-family:courier new;" > # rpm -Uvh createrepo*</span><br /><span style="font-weight: bold;font-family:courier new;" > # createrepo -g comps.xml .</span><br /><br />9. Edit yum.conf<br /> <span style="font-weight: bold;font-family:courier new;" >#vi /etc/yum.conf</span><br /><br />10. Add in the below lines and save your changes. (NOTE: You can actually add it in the yum.repos.d as well if you wish)<br /><span style="font-weight: bold;font-family:courier new;" > [testing]</span><br /><span style="font-weight: bold;font-family:courier new;" > name=testing the repos</span><br /><span style="font-weight: bold;font-family:courier new;" > baseurl=file:///tmp/RPMS</span><br /><span style="font-weight: bold;font-family:courier new;" > gpgcheck=0</span><br /><br />11. Now you have to disable the repositories that point to an online source for the package manager to run properly.<br /><span style="font-weight: bold;font-family:courier new;" > # cd /etc/yum.repos.d</span><br /><span style="font-weight: bold;font-family:courier new;" > # ls</span><br />(You should see something like the below. Those are the default repository files)<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/6528/136/1600/Screenshot-1%28small%29.1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/6528/136/320/Screenshot-1%28small%29.1.png" alt="" border="0" /></a><br />12. To disable the repositories, set <span style="font-family: courier new; font-weight: bold;">enabled=0</span> in the .repo files<br /><span style="font-weight: bold;font-family:courier new;" > # vi fedora-core.repo</span><br /><br />13. Do the same for the rest of the .repo files<br /><br />14. On your desktop, try the Add/Remove Software package manager again.<br /><br />It should work now.<br /><br />The above could not have been done without some reference from <a href="http://www.city-fan.org/tips/YumRepoFromImages">http://www.city-fan.org/tips/YumRepoFromImages </a><br />They also have an excellent tutorial for copying iso from DVDsmagenpiehttp://www.blogger.com/profile/07399447674738276869noreply@blogger.com8