learning-ruby-expert-advice-for-advanced-developers-2b3293f58e

Unable to install Homebrew

Unable to install Homebrew with this? ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)” What’s happened -e:70: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777 ==> This script will install: /usr/local/bin/brew /usr/local/Library/… /usr/local/share/man/man1/brew.1 Press RETURN to continue or any other key to abort ==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew Password: ==> Downloading and installing Homebrew… remote: Counting objects:…

Show completions and quick help tips in Xcode

I know it is troublesome, tedious, or just like hell. Apple has his own way to do a common task. Very often, we need to use the autocompletion in IDE to assist coding so we do not need to memorize the billions of function names. In Eclipse, everything is automatic. A list of function names linked together…

Change author info for old commits in Git

While using hit, it is really usual to have regrets on the commits done, especially the name used. In order to change those information in your repository, open terminal (or cmd in windows), go to the folder of your git repositoy, and run the following commands. Remember, replace “old_name”, “new_name” and “new@email.address” with your own…

Merge 2 unrelated branches in Bazaar

To merge 2 entirely unrelated branches or projects, we need to specify 0 as first revision in revision range. Turn on terminal (in Mac) or cmd (in Windows) and get to your project folder. Merge with the following shell script. merge -r0..-1 means to merge from revision 0 to the latest revision. [sourcecode language=”shell”] bzr…

Compact and repair database in Access through VBA

Normally, we need to go through bunch of clicks to do one action in MS Access. For example, “Compact and Repair Database”. This function can compact your database and make the file smaller. If you never used this, it may take some time to find it. Try it. LOL. But here I would like to show you how…

Run shell commands in VBA

We can use shell to execute any programs. [sourcecode language=”vb”] shell("iexplorer") shell("cmd") [/sourcecode] Please be reminded that we may need to execute in an indirect way. [sourcecode language=”vb”] ‘cmd: execute CMD.exe (Windows Command Processor) ‘/c: with commands ‘dir: show all things in the default directory shell ("cmd /c dir") [/sourcecode] To make VBA wait until…

Multiple network adapters, I wanna use one only, how?

Suppose we have more than one network adapter, how could we designate the adapter used to access the Internet? One way would be manually configure the default gateway. Easy way (2 adapters and with little networking knowledge): Suppose you want to use wireless connection in the condition of having both wire and wireless connection at…