Tag Archives: software and automation

Creating games and apps using ONLY FREE software and tools


Do you know you can create and develop games and apps without cost? You only need a computer — which you should already have, an internet connection — which you should already have and download totally free software and tools that you need. And earn money from it! We will start creating step by step tutorials and videos soon, follow us if you want to learn development 🙂

file and directory selector with gui for tcl – tk

Quick Code: Here is a sample file and directory selector procedure written in tcl – tk. The code is added in my public git repo at git://github.com/rvguiman/tcl-tk.git or https://github.com/rvguiman/tcl-tk.git. Or check the code below.

#-------------------------- gFileDirSelector ------------------------------------------------#
# what: procedure for selecting a file or directory, run it using wish/tk
# arg: optional arg type, valid values none/anything for file selection or "dir" if you want to choose directory instead of file
# return: if type is file, return the full path of file or 0 if cancelled
#--------------------------------------------------------------------------------------------#

proc gFileDirSelector { { type "file" } } {
     if { $type ne "dir" } {
          set types {
          {{text files} {.txt} TEXT}
          {{tcl scripts} {.tcl} }
          {{all files} * }
          }
          set filename [tk_getOpenFile -filetypes $types]
          if {$filename ne ""} {
               puts "file selected -> $filename"
               return $filename
               } else {
               puts "file selection cancelled"
               return 0
               }
          } else {
          set dirSel [tk_chooseDirectory]
          if {$dirSel ne ""} {
              puts "dir selected -> $dirSel"
              return $dirSel
              } else {
              puts "directory selection cancelled"
              return 0
              }
          }
     }


providing complete web solution for www.rickysogood.com

www.rickysogood.comThe three major parts of providing a complete web solution are: server, software and design. The server is a computer that is always turned on, connected and maintained. It is comparable to the human body. The software are the programs that we use to provide all the logic and data processing that create these websites. It is like the brain and internal organs.  The design or the user interface is what people see and interact. It is similar to clothing, accessories and any external part of our body.

www.rickysogood.com is a blog about money management and achieving
financial freedom by Mr. Ricky So, registered financial adviser and expert.

starting with git software – code management

Git is a revision control and source code management software that is light weight, fast and free. if you are a developer, i would suggest learning it. Just using the basic functions of git is enough to help you code efficiently. It is also not necessary to put your code publicly in github.com. You can just use it locally or even create your own private git server.  The truth is you can use it for anything and not just for source code. The first thing to do is download git at http://git-scm.com/downloads selecting your OS. After installation, we can now start using git.

Git Basics

1. Open your shell/terminal or powerShell in windows.

2. (Optional but i suggest you do it) Setup your global user and email setting by typing the following commands.

git config --global user.name "your name"
git config --global user.email "youremail@domain.com"

these information will be used everytime on your git commit or basically printing your name and email if you modify something inside the git directory.

3. The first thing to do is to go to the directory you want to manage.

cd /home/user/example

4. Initialize git inside this directory by typing

git init

5. You can now start adding files in this directory that you want to manage. This may confuse you at first but let me just say, any files you add or edit will not be tracked or saved in the git revision control history until you add it on the staging area. So every time you think that your changes or your new files are good to go to history, always use this command.

git add your_file

or use this to add all files in the current directory in the staging area

git add .

6. To check the status of your files if it will be included on your git commit ( taking a snapshot or history of your files ) use

git status

git status will also give you recommendations on what to do with your files

7. Then, if you want to take a snapshot or version of the current tracked files use

git commit -m "message to remember your current change or snapshot"

if you don’t want to git add files every time, you can also use an optional switch -a to automatically add all new and modified files in the staging area and commit in one command. Use

git commit -a -m "message to remember your current change or snapshot"

8. Finally, use this command to see your history of changes in your tracked directory

git log

the log history is very important for changing back your files from the current version to an old version in case you need it.

Git Basics 2

9. Removing or deleting files. You can delete your files manually but until you delete with this command, the files are still being tracked by Git.

git rm your_file

10. Renaming or moving files. In git, you can easily rename or move files to another file name using this command.

git mv your_file your_new_file_name

Important: you must remember that renaming manually without using this command means your old file is still tracked by git, and you still need to add the renamed file using the git add command. So this command is basically a combination of git rm and git add in one.

11. Then what if you want to go back in time and reset your files from any snapshot or version? Use

git reset --hard commit_sha_hash

Where to find your commit sha hash? use your git log command.
It is very important to take note that once you git reset, all your changes ahead of this version will be deleted and cannot be recovered.

simple email procedure for tcl in linux or unix system

Quick Code:
Here is a sample procedure for tcl that you can use to send email. This basically call the mail function built in linux or unix like system.
Usage: gQuickMail “subject” “sendToEmailAdress” “bodyMessage” “ccToEmail” “bccToEmail”
Git: git clone https://github.com/rvguiman/tcl.git (added in g_misc_utility.tcl)
Or Check the code below

proc gQuickMail { subject sendTo bodyMsg ccTo bccTo } {
        set qmsgHan [open "tempMsg.qmsg" w]
        puts $qmsgHan $bodyMsg
        close $qmsgHan
        puts "sending mail...."
        if { $ccTo != "" && $bccTo != "" } {
                catch { exec mail -s $subject -c $ccTo -b $bccTo $sendTo < tempMsg.qmsg } msg
                } elseif { $ccTo != "" && $bccTo == "" } {
                catch { exec mail -s $subject -c $ccTo $sendTo < tempMsg.qmsg } msg
                } elseif { $ccTo == "" && $bccTo != "" } {
                catch { exec mail -s $subject -b $bccTo $sendTo < tempMsg.qmsg } msg
                } else {
                catch { exec mail -s $subject $sendTo < tempMsg.qmsg } msg
                }
        puts $msg
        catch { exec rm -rf tempMsg.qmsg } msg
        puts $msg
        puts "closing gQMail"
        }