Vim text editor for windows

Tonight i want to install vim for windows on my Win 10 laptop.

Download the installer of gvim80-586.exe from url https://vim.sourceforge.io/download.php#pc.

Install it and follow till the end.

At the end we can choose to show readme like above.

Done installing and try to launch gvim from start menu by searching gvim.

Using gvim (gui version) is easier because we have access to menu instead of typing command.

Bluefish editor for programming

If you a programmer you can use vi or vim or nano to code. Sometimes it just not enough feature or give comfort. I use an editor called bluefish. Install it from package like this :

For openbsd do pkg_add bluefish

If installing for openbsd dont forget to set your PKG_PATH env variable.

For Dragonfly BSD do pkg install bluefish

Bluefish have a good support for html tags and ruby language. See bluefish screenshot below.

Happy coding all !

 

UpdraftPlus Plugin for WordPress

UpdraftPlus is a plugin for wordpress. The plugin can do backup and restore of our wordpress installation. Backup can be send to remote cloud storage such as dropbox like i used now.

Basic function (backup and restore) is cool for me and you can always buy premium version to do clone/migrate and may be something else (i dont know exactly !).

This is my first post about wordpress … egg breaker !

Bye !

Ruby Unique Feature – Block

Block is an interesting ruby languange feature. Block is statements enclosed together using do end or curly braces {}. We can find block in action at code that iterating  an array variable.

Lets try block on irb (interactive ruby)  !!!

Sample above creating variable x which is an array of string. Next command iterating the array using each method and a block passed to it. The block have a parameter named n and n will contain each array element passed to it by each method. Code inside block print output to screen.

Below is an example of block using curly braces.

That is simple examples of block in ruby language. It is an unique and usefull feature.

Bye for now !

Ruby Unique Feature – Open Classes

Open Classes

A class in ruby can be modified by adding method or variable at any point in the code.

Sample code as follow :

class ClassA
  def method1
   puts '1'
  end
end

var1 = ClassA.new
var1.method1

class ClassA
 def method2
 puts '2'
 end
end

var1.method2
var1.method1

 

Ruby Unique Feature – Hashes

Hashes

A hash is a collection of key and value pairs. Use curly braces {} to define a hash. Use brackets [] to get a value of a key from a hash.

Define a hash like below

nations = { ‘ID’ => ‘Indonesia’ , ‘MY’ => ‘Malaysia’, ‘SG’ => ‘Singapore’ }

To add a key value pair to hash

nations[‘BN’] = ‘Brunei Darussalam’

To output value of a key in hash

puts nations[‘ID’]

To output a hash entirely

puts nations

Bye for now !