Category Archives: Uncategorized

CSS Cheatsheet for responsive-ness

Old school! We have lots of libraries now to make frond-end development easier especially making our layout responsive.

Sometimes we need to step back and really see how CSS queries  are structured for this feat. Found a really nice CSS cheat sheet to ponder upon or maybe used for our projects or just reference.

https://gist.github.com/bartholomej/8415655

And whats the go with “ONLY” query. Apparently old browsers ignores this.

https://stackoverflow.com/questions/8549529/what-is-the-difference-between-screen-and-only-screen-in-media-queries

Enter VS Code on Windows

Hi I have been a fan of sublime text for a while now. But also tried different IDE available in the community. Recently been trying ATOM, but it seems a little laggy at times. Anyways here are my top shortcuts I used for Visual Studio Code editor:

[ ctrl + , ] Open settings for configurations
[ctrl + `] Opening terminal console
[ctrl + d] Select next occurence [ctrl + u] deselect back
[ctrl + f2] Select all occurence
[ctrl + k ctrl + c] Add line comment
[alt + shift + down or up] Duplicate line down or up
[ctrl + p] Open command palette and find files quick
[ctrl +  “[” or “]” ] Moves your current line via tab
[ctrl + shift + f ] Find text in files
[ alt + arrow left or right ] Go back and forward
[ ctrl + shift + \ ] Go to matching bracket
[ F12 or CTRL + F2  or ALT F12 ] Go to definition and implementation, peek definition
[ F8 ] Go to the next error
[ Ctrl + W ] Close the current window
[ alt + shift + left or right ] Shrink or grow selection on brackets
[ ctrl + alt + up or down ] Add a cursor for multiple editions

Understanding Sorting Algorithm

I was once asked years ago if I know any sorting algorithm and I terribly failed to answer. As a self taught coder I never encounter having to sort records manually. Because most programming languages have a function already built-in to do this ‘sort’ of thing (pun intended).

So what is it? You my future self should already know the gist of it. Its basically a way to sort set of records based on from lowest or highest to lowest. There are bunch of sorting algorithm listed in this below link:

Different types of sorting algorithms

The most common one is Bubble sorting, you take the first value in the collection or array and compare to the second, if second value is lower, you swap the second to the first. Then we take the second value and compare to the third. Every swap you flip a flag that a swap has happen. You just keep repeating until the swap flag remain false and then everything should be sorted.

For more detailed videos of known sorting algorithm whenever you need it below are full explanations.

Algorithms Playlist

Windows: Do everything with shortcuts!

When working on your chosen OS, we tend to do repetitive work using our mouse. The time to move the mouse to the direction of the icon you wanna click is more effort than pressing 2 to 3 keystroke on the keyboard. So what do someone like us lazy people do to make this effortless and hopefully avoid injury to our hands in the future? Shortcuts! Here I will list my most used chores on windows that I often find doing.

Changing Explorer View
CTRL + SHIFT + 1 Extra Large
CTRL + SHIFT + 2 Large Icons
CTRL + SHIFT + 3 Medium Icons
CTRL + SHIFT + 4 Small Icons
CTRL + SHIFT + 5 List
CTRL + SHIFT + 6 Details
CTRL + SHIFT + 7 Tiles
CTRL + SHIFT + 8 Content

Using RUN command with WIN + R key:
cmd  To open cmd line.
start + . Type this comment to open current working folder in windows explorer
Press win key , type cmd press ctrl + shift + enter Run as administrator.
services.msc  Open services window
control  Open control panel
ncpa.cpl  Open network connections
regedit Registry Editor
shift + F10 To display right click on any object selected
appwiz.cpl Very handy to open Add/Remove program

Open CMD on any window explorer open:
alt + d and type cmd This will open command line in that folder

Editing Text
shift + up or down – To select whole line or below line.
shift + home or end – to select from cursor left and right, very useful

Navigating Windows Explorer
F6 Very handy to navigate to different elements of the window like the left panel to get the drive you want
alt + D Move focus to the address bar and select current path.
ctrl + N Open new window on the same folder
Alt + Right Arrow Go forward.
Alt + Left Arrow Go back.
Alt + Up Arrow  Go to parent level

Windows Install change hardware configuration

Ever wondered how licensing works now comes Windows 10? Back in previous Windows OS, as soon as your pc glitches the last resort for salvation is through fresh install of the system.

I can just boot from my DVD drive using the OS CD and input back your serial number and away you go.

This is still applicable in the latest Windows 10. You can also create a boot USB disk if you are trying to install to a different drive. But somewhat came as a bit confusing as many devices now came pre-installed with the OS.

If you are building your own system, you will need to buy your own license or if you have a Windows 8 or 7. You can go to the upgrading route. When your build PC you have to know that, new motherboard = new license.

Here is a link that will help you understand a little bit the process how installation of new OS works.

How does Windows 10 licensing status change with changes in hardware configuration

In other words, when you buy a new PC loaded with operating system, you need to ask how they installed the OS. And make sure you get the serial key off them by hook or by crook if its not already on the physical box on the sticker.