Archive for October, 2015

Some Cygwin tips

Thursday, October 8th, 2015

I’ve included here some first things I do after every fresh Cygwin installation.

Install Cygwin with Mintty, Zch, git, openssh, wget, curl.

Set Cygwin to use windows user home directory.
Open CygwinDir/etc/nsswitch.conf and add this line to it:

db_home: windows

Make Cygwin windows drive shortcuts shorter.
Type this into the Cygwin command line:

ln -s /cygdrive/c /c

Browse to C by typing “cd /c”. Do this for every drive you want.

Make Cygwin not fuck up file permissions
Add/modify this line to [Cygwin folder]/etc/fstab

none /cygdrive cygdrive binary,noacl,posix=0,user 0 0

Use Mintty as terminal and Zch as shell.
Edit your cygwin shortcut to look like this:

C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico /bin/zsh --login

Install Oh My Zsh in Cygwin
Just follow the normal instructions at this point:

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Remove Boo and UnityScript references from Unity projects.

Tuesday, October 6th, 2015

To stop Resharper in Visual Studio suggesting Boo.Lang when declaring List<>‘s and other types common to both libraries, simply put this script in your editor folder.

Original source: https://gist.github.com/jbevain/a982cc580fb796c93e4e

using UnityEditor;
using SyntaxTree.VisualStudio.Unity.Bridge;
 
[InitializeOnLoad]
public class ReferenceRemovalProjectHook
{
	static ReferenceRemovalProjectHook()
	{
		const string references = "\r\n    <Reference Include=\"Boo.Lang\" />\r\n    <Reference Include=\"UnityScript.Lang\" />";

		ProjectFilesGenerator.ProjectFileGeneration += (string name, string content) =>
			content.Replace(references, "");
	}
}