How to open Sublime Text in command line with subl on Mac OS?

I have tried to setup Sublime Text 3 so I could run it on my new Mac from terminal just typing subl . but all the when I wanted to make the symlink I was getting this error: ln: /usr/local/bin/subl: No such file or directory  all the time.

The problem is that I had no bin directory on that path. So to fix that you need to do the following:

cd /usr/local
sudo mkdir bin

Now we have that bin folder on /usr/local/bin path and now we can create the link using:

Sublime Text 3

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl

Sublime Text 2

sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /bin/local/bin/subl

Exit the terminal and start it again and you should be able to use subl . to open all files in current folder in sublime text for editing.

How to fix 0x0000007b blue screen (BSOD) ?

Are you getting that blue screen (BSOD) with error message 0x0000007b when booting your computer or trying to install a new Windows operating system (on a computer with SSD drive)?

0x0000007b blue screen BSOD

The problem is that in BIOS your SATA is set to AHCI instead of ATA. To fix this problem you’ll have to enter the BIOS and change it back and your system will function normally. This can happen if your BIOS data is lost or in some cases the BIOS batter is empty, or if you cleared bios by hand. Don’t worry none of your data is damaged in any of these cases.

Here’s how to fix this problem:

  1. Reboot your computer and keep pressing F12 to enter BIOS. On some laptops  it’s F2 or F8 (it should be shown on your screen)
  2. Go to Advanced tab and change ACHI to ATA option under SATA Operation (it might have a different name depending on your BIOS).
  3. Save the changes and reboot.

That’s it!

 

Download Offline Installer for Microsoft .NET Framework 4.6, 4.5, 4.0, 3.5, 2.0 and 1.0

Microsoft Windows applications developed using .NET Framework require Microsoft .NET Framework to be installed on computer that will run the application. Microsoft provides installer for .NET Framewework but by default it’s an online installer. That means that you basically download a small installer file that after it’s executed automatically connects to Microsoft servers and downloads the required components and completes the installation.

The online installers work great as long as you have internet conection. But some users don’t have an internet connection and that can be a problem. Sometimes developers require offline installer so they can ship it with the software inside software installation or on CD/DVD medium.microsoft-dot-net-new-logo

I have gathered a set of links of Microsoft .NET Framework offline installers and you can download full installation files from the following links:

.NET Framework 4.6 Setup

.NET Framework 4.5 Setup

.NET Framework 4.0 Setup

.NET Framework 3.5 Setup Service Pack 1

.NET Framework 3.5 Setup

.NET Framework 2.0 Setup

.NET Framework 1.0 Setup

.NET Framework Client Profile Offline Installer

 

How to get rid of Windows 10 upgrade nag screen?

If you run Windows 7, Windows 8 or Windows 8.1 you probably got an offer to upgrade to Windows 10 and you noticed that upgrade icon in task bar to your clock.

Windows 10 Free Upgrade Icon

Windows 10 Free Upgrade App GWX

If you don’t want to upgrade to Windows 10 and you want to keep your current Windows and you’d like to get rid of that GWX.exe nag screen and taskbar icon run cmd as administrator by typing in cmd in start menu search and right clicking the Command Prompt result and clicking on Run as administrator and confirming that you want to run command prompt as admin.

Run command prompt as administrator

When you get that black command prompt window just type (copy/paste) the following command and once it’s executed reboot your computer and Windows 10 upgrade will be gone. Out of many this is the only solution that actually worked for me!

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Gwx" /v DisableGwx /t REG_DWORD /d 00000001 /f

 

One more thing I also noticed is that even if you’re not interested in upgrade Microsoft still downloads entire Windows 10 installation and stores it in c:/$windows.~BT folder just in case you say “yes” to their upgrade offer. That folder can take from 2 to 3 GB of your disk space and it’s especially valuable if you have (a smaller) SSD as your primary hard drive. Removing the folder frees up the space but quickly (after a reboot) it starts downloading it again so it doesn’t just take your disk space but also uses your internet bandwidth. To stop it from doing that after you delete folder $windows.~BT create a new empty one with the same name and then right-click it and in folder properties make it Read Only. That way it will remain empty as Windows will not be able to download Windows 10 files and store them in it.

 

How to safely install git on cPanel/WHM?

GIT is popular version control system for software development and it’s really common today. Installation on servers without cPanel is pretty simple but on servers that do have cPanel can be tricky because git installs it’s own Perl libraries and that can cause many problems and conflicts and often results in unusable WHM server in the end.

So whatever you do – do not install GIT!
I repeat: DO NOT INSTALL GIT ON WHM SERVER!

Because it’s already installed 🙂
It’s just not in path and you can’t use it.

There are two ways of doing this:
1. WHM/root way that will make git available to all users on the system
2. cPanel way that will make git available only for the current account

Hot to enable it in WHM?
To make git usable to all users (with ssh access) just execute this single line of code as root:

ln -s /usr/local/cpanel/3rdparty/bin/git /usr/local/bin/git

How to enable it in cPanel?
If you are using a shared (or reseller) hosting powered by cPanel (and you don’t have WHM access) than you need to login using SSH and locate your .bashrc file. It should be in your home directory. Open that file for editing and add git to your path by adding following two lines of code at the end of your .bashrc file:

PATH=$PATH:/usr/local/cpanel/3rdparty/bin 
export PATH

To edit that file enter: nano .bashrc
After you add these two lines your .bashrc file should look like this:

bashrc-git-path

To save the changes press CTRL+X , then press Y and Enter. In order for changes to be accepted it will be necessary to re-log in to your SSH command prompt.

How to check if git now works on cPanel?
Well, that’s really simple. Just login to SSH and execute: git –version
and that should return git version (currently cPanel git is version 2.6.1)

That’s it!
Nice and simple.
Happy giting…