Tag Archives: tutorial

PowerShell tips – part 007.

To create a list grid to show infos and output from powershell, you can send the output to the Out-GridView cmdlet:
Let’s make one example to show the output of : Get-WmiObject Win32_Processor .

The result is this:

Posted in All, Commands, PowerShell, Windows 10. Tagged with , , , , .

HTML5 – Example calendar – ruler.

This is a simple calendar ruler example make just with HTML5 and one CSS file.
The example can be see here.
Create one folder and put two file named: index.html and style.css.
The style.css file come with this source code:

The index.html file can have this source code:

Posted in All, HTML 5, Programming. Tagged with , , , , .

HTML5 – Example of 360 online video player.

In this tutorial, I will show you a source code for a video file player in HTML5.
The main reason I created this source code was: testing 360 degree and / or 3D ( red and blue ) video files created with the 3D Blender rendering program.
The source code is very simple. We have a part to create HTML5 elements: text messages, file upload button, message display, and video part.
These elements are stylized with CSS colors with the style tag.
The last part is the javascript script that actually handles uploading, testing and then playing the file.
You can create a HTML5 file , paste this code and test it with your video file.

Posted in All, HTML 5, javascript, Programming. Tagged with , , , , , , .

Go – About goimport tool .

A Go developer know the code must be formatted with standard gofmt tool.
While gofmt attracks much attention, goimport is overlooked despite often being more useful.
Basically, goimport does everything that gofmt do.
First, you need to install into go using:

This will auto import Go packages using goimports tool.
While correcting, goimports removes unused imports and adds missing ones.
Additionally it groups and corrects imported packages.
You can used with vim and atom editors.
To setup vim editor to auto run goimports on save using vim-go, use this :

If you want to use the atom editor then you need to install the atom package named go-imports from abiosoft.
Use command palette cmd-shift-p, search for Go Imports: Process or using keybinding ctrl-shift-i.

Posted in All, Commands, Go. Tagged with , , , , .

Go – Using the go command .

After install go programming language from here, you will need to deal with the go command.
I’m not very good with golang , but I found some interesting issues for those who want to use go command with golang.
About go command can you read here and the go help output come with this help:

There are a few things you should know:

  • don’t use go list to see packages , use this command:go list all
  • take a look at install go on environment: go env
  • use help argument to get more help, like: go help gopath , go help env
  • see your go version  for  debug issues: go version
  • you can build your file (here called term_size.go) passing some gcflags : go build -gcflags=-m term_size.go
    # command-line-arguments
    .\term_size.go:13:25: inlining call to termbox.Size
    .\term_size.go:15:16: w escapes to heap
    .\term_size.go:15:16: h escapes to heap
    .\term_size.go:15:16: main ... argument does not escape
  • do not try this on Windows OS : go build -ldflags , first read more about: C:\Go\pkg\tool\windows_amd64\link.exe: -X flag requires argument of the form importpath.name=value
  • the Windows shell doesn’t have single quoted strings:
    go list -f "{{ .TestGoFiles }}" archive/tar
    [reader_test.go strconv_test.go tar_test.go writer_test.go]
Posted in All, Commands, Go, Windows 10. Tagged with , , , , , .