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