Tuesday, April 30, 2013

Vim with PowerShell installation

Tired of the old command line? Or you like to use vim in a linux/unix cmd mode?  Powershell is installed by default in windows 7. It has better screen size compared to cmd.

You can now use vim on powershell. I am new to powershell and after googling for minutes, I found out that vim can work on powershell.


First you need to run powershell in Admin.

Just type this to create a new powershell profile:


new-item -path $profile -itemtype file -force


Also:
Set-ExecutionPolicy RemoteSigned
This would allow the profile to be executed smoothly.

To open the profile in Notepad, type:
notepad $profile
Then Insert these text:

$VIMPATH    = "C:\Program Files\Vim\vim73\vim.exe"

Set-Alias vi   $VIMPATH
Set-Alias vim  $VIMPATH

# for editing your PowerShell profile
Function Edit-Profile
{
    vim $profile
}

# for editing your Vim settings
Function Edit-Vimrc
{
    vim $home\_vimrc
}
Some Bonus: You can create a shortcut in your desktop to run the vim powershell.

Just create a shortcut link of powershell and edit the target to:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe vim

You'll load vim in no time. Next time I'll try to check if msys works on this so we can use grep on powershell vim :)
Screen shot


Sources:
http://stackoverflow.com/questions/4037939/powershell-execution-of-scripts-is-disabled-on-this-system
http://msdn.microsoft.com/en-us/library/bb613488(VS.85).aspx
http://juliankay.com/development/setting-up-vim-to-work-with-powershell/



Wednesday, February 27, 2013

Dota VS HON VS LoL

Gamers out there wants to know which is the best. So here are my thoughts on these games.
All of these games are real time action RPG, where in you play as a role of champion or hero and hack your way to enemy's towers and bases to destroy their Mother of Bases like nexus, tree, base or whatever.

So which is the best?  I played all of these games and I started like this. Dota -> HON -> LOL

I'll be detailing some of the advantage and disadvantage.
Dota/Dota2 :
pros:

  • Quite out there for the longest time. 6.77b latest patch as of this writing
  • Fast updated heroes and items
  • For dota, minimum requirements is just warcraft 3.
  • Difficulty HIGH:
Cons:
  • Unbalanced heroes.  Skills are not heavily thought of and youre in the hands of a single creator of the game.
  • Game designs are highly dependent on warcraft 3 gameplay like armor/magic resist %base.
  • Balance updates are not explained very well. You don't understand why some get +str buff or -str buff on some heroes.. No explanation and no tests as to support it.
  • 1 Godly hero fat hero can finish the game and kill everyone.
  • Map is unbalanced. No matter what you say, the map is not symmetrical.
  • Cartoonish graphics on DOTA2
  • Unbalance item design. Like: linken sphere, almost totally negated Lina Inverse Ultimate. Ultimates are Ultimates.  Invisibility/Blink gameplay is so overpowered with blue ward so imbalance and TrueSight Gem as a DROP ABLE item.
  • CREEP DENIES - WTF? Team killers should be penalized.

HON:  Is a replica of DOTA with additional goodies so some pros/cons are carried over.
pros:
  • Good graphics
  • Easier to learn if you know DOTA
  • Responsive hero attack animation compared to dota
  • Updated new heroes and items.
  • More item selection
  • Great MidWars Game.
  • Some sense of achievements for obtaining or unlocking heroes.
  • Mic Interaction on games

Cons:

  • Cons on Dota are somewhat Carried over.
  • Some new heroes are created narrow mindedly like DOTA.
  • High Level games can look so boring due to  3 1 1 laning
LOL: From the original creators of Dota + Some other Team.

Pros:
  • Almost complete balanced gameplay of heroes and items
  • Easier to learn when you do tutorial
  • Can Browse while loading
  • Symmetrical maps / almost balanced.
  • Growing player numbers
  • Some sense of achievements for obtaining or unlocking heroes.
  • Teamwork is strongly emphasized here.
  • You don't get a huge disadvantage when your barracks/inhibitor is destroyed. Because it respawns after some time.
Cons:
  • No Builtin Mic Interaction on games
  • Graphics can be cartoonish. Characters looks like cartoons.
  • Hard to LIKE when you played DOTA/HON before
  • Runes Can be a Pros or Cons when playing against different levels
  • On High Level Games, Heroes are usually the same due to hero design and imbaness ( Ezrael, Lulu, Sona, Shen, Khazix are almost always there). This game still has some balance issues. NOTE: Ezrael works on riot can't blame this hero to be design to be a little overpowered (fast CD, DPS, AOE, GLOBAL SKILL, + BLINK, WTF). http://leagueoflegends.wikia.com/wiki/Colt_'Ezreal'_Hallam


Friday, August 17, 2012

Emo Framework Tutorial Example 2 - Click and Drag a Certain sprite

Here's another example of moving a certain sprite that you desired. Imagine like a moving a chess piece in a board.


 class PickupSprite {  
      sprite1 = null;  
      sprite2 = null;  
      selected_sprite = null;  
      function onload() {  
           print("Loading PickupSprit");       
      }  
      function onDispose() {  
           print("Exiting...");  
      }  
      function onMotionEvent(mevent) {  
           local id = mevent.getPointerId();  
           local action = mevent.getAction();  
           if(!sprite1) {  
                sprite1 = emo.Sprite("private.png");  
                sprite1.load();  
           }   
           if (!sprite2 ) {  
                sprite2 = emo.Sprite("captain.png");  
                sprite2.load();  
                sprite2.move(100,100);  
           }  
           if(action == MOTION_EVENT_ACTION_DOWN || action == MOTION_EVENT_ACTION_POINTER_DOWN ) {  
                print("Clicked at x: " + mevent.getX() + " y: " + mevent.getY());  
                if(sprite1.contains(mevent.getX(), mevent.getY()) ) {  
                     selected_sprite = sprite1;  
                }  
                else if(sprite2.contains(mevent.getX(), mevent.getY()) ) {  
                     selected_sprite = sprite2;  
                }  
           } else if(action == MOTION_EVENT_ACTION_UP ||   
                          action == MOTION_EVENT_ACTION_POINTER_UP ||  
           action == MOTION_EVENT_ACTION_CANCEL ||  
           action == MOTION_EVENT_ACTION_OUTSIDE ) {  
       print("Released");  
                selected_sprite = null;       
           }  
           if ( selected_sprite ) {  
                print(selected_sprite.getName());  
                handleTouch(selected_sprite, mevent);  
           }  
      }  
      function handleTouch(sprite, mevent) {  
     local action = mevent.getAction();  
     if (action == MOTION_EVENT_ACTION_DOWN || action == MOTION_EVENT_ACTION_POINTER_DOWN) {  
     } else if (action == MOTION_EVENT_ACTION_MOVE) {  
       sprite.moveCenter(mevent.getX(), mevent.getY());  
     } else if (action == MOTION_EVENT_ACTION_UP ||  
           action == MOTION_EVENT_ACTION_CANCEL ||  
           action == MOTION_EVENT_ACTION_OUTSIDE ||  
           action == MOTION_EVENT_ACTION_POINTER_UP) {  
     }  
      }  
 }  

Emo Framework Tutorial - Load And Drag a Sprite

I've been recently exploring this new framework. It lacks sources so im posting it here.

This example would allow you to load a sprite, and move it base on your mouse/touchdrag


 class LoadDragSprite {  
      sprite = null;  
      function onLoad() {  
      }  
      function onDispose() {  
      }  
   function handleTouch(sprite, mevent) {  
     local action = mevent.getAction();  
     if (action == MOTION_EVENT_ACTION_DOWN || action == MOTION_EVENT_ACTION_POINTER_DOWN) {  
       sprite.moveCenter(mevent.getX(), mevent.getY());  
     } else if (action == MOTION_EVENT_ACTION_MOVE) {  
       sprite.moveCenter(mevent.getX(), mevent.getY());  
     } else if (action == MOTION_EVENT_ACTION_UP ||  
           action == MOTION_EVENT_ACTION_CANCEL ||  
           action == MOTION_EVENT_ACTION_OUTSIDE ||  
           action == MOTION_EVENT_ACTION_POINTER_UP) {  
     }  
   }  
   function onMotionEvent(mevent) {  
     // pointer id is a unique id of the pointer.  
     local id = mevent.getPointerId();  
     local action = mevent.getAction();  
     if (!sprite ) {  
                sprite = emo.Sprite("graphics.png");  
                sprite.load();  
     }  
     handleTouch(sprite, mevent);  
   }  
 }  

Sunday, February 12, 2012

Yii thoughts

I was researching on some good PHP MVC framework. I run into yii. I heard pretty good things about yii unfortunately, i don't like the conventions and how it tries to call yii libraries. I just think it's not clean and an eyesore to the code. I still admire it's full functionality plus the widgets.. It's still so powerful!

CodeIgniter Crud Generator

I really think that CodeIgniter Needs a Crud Generator like Yii/Cakephp. Developers like me is so poor on webdesign, and I intend to focus more on the backend. I make sure that the models are good/smooth and ok before I proceed to fixing the views.

I just tried, grocery crud. Spent an hour and found out it doesn't support (yet) postgres.

Monday, December 19, 2011

Zambosale.com extends help on typhoon Sendong victims

The zambosale.com team would like to extend our deepest regrets to those who have been affected by typhoon sendong. We will be sending some water and clothes through ADZU/LBC.

Your truly,
Zambosale.com Team


Monday, July 11, 2011

Zambosale.com Like Page

Hi,

Everyone is crazy about facebook. For those fans out there, please do like us in our facebook page. Spread the word and the like :)



Thanks,
zsaler

Wednesday, May 25, 2011

zshrc configuration file on freebsd8.0

I've been wanting to try zshrc for a long time now. It just seems to be complicated to learn from scratch when coming from bash.

I found this very good site having a nice zshrc. However when I use that script to run my startx fluxbox. Fluxbox seems to be not functioning well. I just need to do remove .zshrc and add it again to make it work.

Anyway here's the link:
http://grml.org/zsh/


wget -O .zshrc.local http://git.grml.org/f/grml-etc-core/etc/skel/.zshrc

Tuesday, February 22, 2011

Zambosale.com Released

Finally after 6 months of hardwork and spare time from the office, we are able to successfully launch our very own website - http://zambosale.com.

For those who don't know yet, zambosale.com is an online shopping, buy, sell, barter online website targeted for Zamboanguenos. There are still lots of work to be done and more features to be added.. stay tuned!

Register now at http://zambosale.com

Wednesday, January 05, 2011

Zamboanga Christmas Vacation 2010

Most people don't know where to go when they reach Zamboanga City. It's really incredible once you know where you go. Here are some of my pix during my vacation.



Excited to spend Christmas in my hometown. Nothing beats the Sacred Ground of Fort Pilar.


Fort Pilar at night time. :P


A newly built plaza near Fort Pilar



The Museum in Fort Pilar
The last time I went inside was during my science fair trip in my School Years. It would be nice trying to visit it again.


How about the infamous Paseo Del Mar Beside the Fort Pilar. The Roxas Boulevard Gig equivalent in Metro Manila.



Pasonanca Park


Country Chicken In Pasonanca

Tuesday, November 16, 2010

CSIT '07 Reunion 2010 version

 

It's been a while seeing my good old friends in college. I miss those times, laughing, studying and fun
programming. Hope we can have a next reunion with great attendance. See you next time guys and girls!
Posted by Picasa

Tuesday, November 09, 2010

My New Nikon Lens

Last night, I got a good deal from a well known buy and sell ads online.
My new Nikon 18-200mm VRII. I feel like doing some photoshoots right now! Hopefully I can use it well if the Zamboanga City Photography Club can plan for a photoshoot. Oops ako pala creator ng groups na un. :P

After I finish my major project http://www.zambosale.com, I hope I can buy some stuffs like this on the site.


Wishful thinking!
Kastarsis

Monday, November 08, 2010

My T61p retired.

Last night, after installing sc2 and addictive game. My laptop expired, crashed and killed. I hope I won't feel bad so long.. After watching the movie se7en, it makes me feel that I'm so totally attached to that machine and the game. I needed a break and my retired laptop is probably a heads up for me to know that God awaits me.


Thank you Lord,
CMA

Se7en Capital Sins.

Last night, I watched the movie entitled se7en. It was a 1995 movie and acted by Brad Pitt and Morgan Freeman. Both are one of my favorite actors in Hollywood.  The first time I heard about this movie was wayback Grade School when we were having Capital Sins as our topic in Religion class.

Right now, I have to admit that I'm really sinful and these capital sins should not be ignored in our every day life. They just destroy us an rip everything apart one we have received from God's love.
 The movie made me think a lot of questions especially in the end.

1.) Is there any man able to control Brad Pitt's emotion, feelings and anger? Will there be a way to forgive a man that instantly?  His pregnant wife just got beheaded and the devil is taunting in his face.

2.) Will God forgive a Brad Pitt's character when he shot the serial killer? Brad Pitt knew that John Doe wanted him to pull the trigger to fulfill the last sin -- Wrath. 


I hope that by knowing what sin is, I will be able to know more faith instead of knowing sin.



Monday, November 01, 2010

Real Estate on Zamboanga

Real estate has proven the world that a better place to live in usually demands a lot of money. Now In my quest to help Zamboanga,
Our team has started to create zambosale.com, to provide an opportunity for real estate agents in Zamboanga to grow. Help us in
improving to a better Zamboanga.

Tell your friends and Colleagues that Zamboanga is great place to have a home.

Coming Soon....

www.zambosale.com

Cheers,



Sunday, October 17, 2010

Got my nikon 35mm 1.8f G

After long hours of tipidpc, I was able to decide to go for 35mm.

I hope to get better pictures with this one!

Tuesday, October 05, 2010

Tipidpc feed script

Out of boredom, I was able to create a simple script to get feeds from tipidpc. I was getting frustrated
while waiting, refreshing and reading at items. Finally, I made a script to automatically display the new active items for sale every 30 seconds. If you guys have linux/unix, install a text browser 'links' to run this.


<code>
#!/bin/sh
while [ 1 ]
do
MSG=`links -source http://www.tipidpc.com/ | sed -n '/Buys/,$ !p' | egrep "PHP|viewitem" | sed 's/[^>]*>//' | sed 's/<.*//' | tr -d "\n" | sed 's/Posts/\n/g'`
echo "$MSG"
X=`echo "$MSG" | grep -i "laptop"`
if [ -n "$X" ]
then
echo "emailing....."
echo $X | mail -s "subject" user@email.com
fi
sleep 30
clear
done

</code>

There you go.. A simple script that also emails me on items that i'm interested on. Viewing this on my terminal is really addicting. Since there are lots of new items being posted every 30 secs.
Additional feature might be added to display the hyperlink in the terminal so that I can easily ctrl+click to browse it immediately.

Enjoy!


Sunday, October 03, 2010

Shutter Island

I watched Shutter Island last night. I knew he was insane because he was hallucinating from the start of the movie.
I found it cool that he was able to create a different persona by himself. Pretty interesting because it was an anagram of his name.
I tried to search for my anagram also, so far this is the best for my complete name:
Attachable Orphans Mirrors
For my nickname:
normal
Sounds so cool!
If you want to find more anagrams, visit this site:
http://www.wordsmith.org/anagram/

Tuesday, September 28, 2010

Metro Manila Buses a Nuiscance?

Buses are one of the main transportation in the metro. Especially going to my Makati office, its one of the mammoths ruling EDSA. After spending a lot of time riding this transpo, I came to a conclusion that these buses are the primarily cause of heavy traffics. They do a quick right turn, change lanes, harrass with big horns and sudden stop for passenger pickups/unloads.

Standing on the Bus
It's probably one of the annoying things to see when I first came here in Manila. People standing should not happened. These buses have a max passenger capacity located near the entrance and just right above the tires. And those numbers represent something which the conductor ignores. Moreso, the worst part of is that those bus conductors try to squeeze in as much people as it can just to take all the passengers going to makati. It's just not right.. It's greedy, selfish and troublesome. What happened to Filipino's 'dangal' in this case?

Roaring Horns
I have lots of experience wherein I'm beside a bus and they tend to push their very load horns. I don't know what's up to them but as you know, those horns are so horrible in the ears. I bet if there is a research study on bus drivers, non-aircon bus drivers would probably have a high hearing loss. This has to be regulated.I think there are plenty of buses for everyone. If these buses don't tend to pickup more passengers when it is full, i'm pretty sure that metro would be not be as congested as it is now.As for the passengers, pakiusap naman if you see buses that are full. Don't ride on it just step down the bus. I noticed some drivers are rude. As soon as you stepped the bus platform, you are not allowed to go down because its loading zone? Geez, karma to those drivers. Have experienced a lot of cases like these.