I was already excited about the recent ASP.NET vNext developments. Things like the fact that you can get the ASP.NET source code on Github, that it’s completely FOSS and that it’s disconnected from the rest of the .NET stack are just plain awesome.
A huge step for ASP.NET vNext is that you don’t need Visual Studio to write software with it. You can use your favourite text editor like Vim, Sublime, Emacs or whatever you like, together with a number of open source command line tools.
A second huge thing is that ASP.NET 5 can now run cross-platform using Mono on Linux and Mac. Not only can you use your development tools of choice to write and build your C# code, you can also do it on the OS of your choice. .NET everywhere. Think about it. *mind blown*
Yesterday however, things got even sweeter as Microsoft is now releasing more of the v5 .NET Framework as open source. This means more and easier cross-platform development and Mono compatibility (as the source can be easily integrated in Mono) for .NET code.
On top of that there is now a new Visual Studio Community edition of Visual Studio available for free. This is equal to the Pro version, so you can ditch those crippled free “Express” versions and write code in the tools you’re used to professionally. I love this one. I’ve messed around with SharpDevelop and the Express version, but if you’re used to the “real thing” it feels like having to work with your hands tied behind your back.
As if this wasn’t enough there’s a bunch of other cool improvements too, like getting only the .NET framework components you need for your project and pull them in using NuGet. Scott Hanselman sums them up nicely.
So if you’ve always wanted to check out .NET or C# but didn’t want to because you had to run it on Windows and in Visual Studio, there’s nothing holding you back any more. For .NET developers this is great. It gives us more freedom than ever without having to learn a new language and framework. For people hacking away on OS X and Ubuntu with Ruby, Python etc. because they want to use FOSS, this is an opportunity to dip into the wealth of .NET resources out there and try something new.
The strategy is clear. They want everyone to use the .NET framework, they want everybody to run that code on Azure (even if you’re not using .NET) and they see that making it open is the only way to get there. Great times are ahead.
So you want to make the plunge and check out what that awesome Vim editor is all about on a Windows machine? I did about a year ago, and this time I actually stuck with it. I tried it 2 times before already, but I gave up every time after a few hours or days because of the steep learning curve and the fact that nothing seemed to work the way I’m used to.
The goal here is to get Vim set up on a Windows box, make it work like a Windows app and make it look like something you aren’t afraid of being seen with (that default layout, euhm, seriously…).
installing Vim on Windows
The easiest way to install gVim (the non-console version) on Windows is by using the Vim Chocolatey package. It installs the Cream Windows flavored Vim for you from Sourceforge and sets up your system path so you can run “vim” and “gvim” to start the editor from the command line if you want to.
Chocolatey itself is like apt-get for Windows. It’s a NuGet based software package manager and if you’re a software developer or have to install systems a lot, I’m sure you’ll love it.
To install using Chocolatey, type this from a command shell (run in administrator mode):
choco install vim
Easy isn’t it?
If you really don’t want to setup Chocolatey (but you should really) you can also get the Windows binaries from vim.org, or the Cream ones. You’ll get the Cream editor with that based on Vim, but I didn’t want that cause it’s not quite pure Vim anymore (not modal for example).
Before you start configuring Vim you should start with getting to know it. Whatever comes next will be a lot easier once you know how to move around, save files etc. You know, those typical things you do in a text editor anyway.
So basically you have to RTFM. Or at least, the short version of it.
Find the Vim tutor in your start menu and run it. Once you’ve completed that, you know enough to get around in Vim and find out how to get help for other stuff. Also, don’t bother with doing it the hardcore way. Just learn Vim at your own pace, use the cursor keys and the mouse if you want. You’ll pick up more advanced stuff as you go along.
Just like this guy said.
Vim uses vimrc configuration files to store settings. There is a default vimrc file in your Vim installation folder, but you shouldn’t touch that one because it can be overwritten when you install a Vim update. Your own settings go into a new _vimrc file containing only the things you want. You can “source” or include other vimrc files, to avoid duplication or organize your configuration.
On a Windows machine this goes into your user folder (c:\users\username\_vimrc).
To see and edit your current vimrc (the one use by vim when it starts) type:
Once you’ve created your own config file, the above command will automatically open it. So let’s do just that, like this. “e” is short for “edit” btw:
That tilde character (~) stands for the path to you home folder, which on Windows is normally set to c:\users\<username>.
On Windows the folder ~\vimfiles is used to store custom plugins. I put my vimrc in ~\vimfiles and source it from the ~\_vimrc file. That way I easily sync my whole setup to another machine by simply copying the whole vimfiles folder. So my ~\vimrc file contains only this line.
You can keep everything in _vimrc of course if you want.
You can test Vim statements from the command bar before you put them in your vimrc file. A handy way to test and see if it really does what you want it to without having to restart Vim and reload your configuration.
making Vim behave like a Windows editor
If you install the Windows gVim version this will normally be setup in your vimrc configuration file automatically, but it’s always handy to know what settings are making the magic happen.
Vim doesn’t use the typical Windows key binding like CTRL-S to save, CTRL-C,V,X to copy, paste and cut. As a hardcore Windows user you expect these to work for all applications, no matter how geeky they are. If you check out the original vimrc in the Vim installation folder you’ll see the same statements as below.
You can copy these into your own vimrc file.
" Activate all the handy Windows key-bindings we're used to.
Or you can source the original config in yours:
Now your Vim should (still) behave pretty much like a regular Windows editor, making things a lot easier to use it for all your basic editing.
making it look good
Man, it does look ugly doesn’t it? All white and with that terrible font? Now let’s make it look pretty so you don’t have to be ashamed of all those hipsters sporting their fancy Sublime.
This depends on your personal preference of course, but I like it when my editor doesn’t look like it’s from the 80’s. I pasted some of my esthetic config changes below. Each has some comments on it explaining what they do. Use the help feature (:h ) if you want to find out more, and remember to only put things in your vimrc that you understand.
" Display line and column number in bottom ruler.
" Display the line numbers.
" Activate syntax highlighting.
" Set a nice theme.
Check out all the themes you have installed by using CTRL-D (auto-complete) after you typed in :color on the command bar.
" Set a nicer font.
" Hide the toolbar.
You can exclude hiding the toolbar, but I just find it ugly and never use those buttons anyway. This is very minimal, and there are plenty of other themes and plugins available to change Vim’s appearance, but that’ll be for another post. For more vim customization tips, check out what I have in my _vimrc file.
Hopefully this gets you going in the wonderful world of the Vim editor on Windows. Just keep at it I’d say and feel free to drop any questions or remarks in the comments.
Edit: replaced the KicksassVim Chocolatey package with the Vim one because the first doesn’t seem to be updated any longer.
I’ve had this list around for a while and though that most people would probably have heard of this by now so I didn’t see the point in posting about it.
Until last weekend someone on twitter was happy to find out about Chocolatey. So I guess not everybody knows these little gems yet, hence this blog post!
Chocolatey: a Windows packages manager of sorts. A bit like apt-get on Debian. It allows you to install a bunch of Windows software and tools from the command line. It’s pretty cool and is super handy to get a (developer) box up and running in no time. It’s also handy to keep your installed package up-to-date with the “cup all” statement. Sweet.
There’s lot’s of good stuff in the gallery already, so you’ll probably find your favorite tool in there. If not, you can add it yourself because it’s built on the NuGet package manager system, or browse what’s available and find some new gems you didn’t know about yet.
I haven’t really used Boxstarter myself yet, but if you’re planning on using Chocolatey for some serious VM Windows installer magic, it might come in handy. It builds on top of Chocolatey and allows 100% uninterrupted Windows installs. Thought it was worth mentioning.
ScriptCS: one of Glenn Block & co little open source coding adventures. He thought it would be cool to use C# and the .NET framework to run scripts on Windows using the Roslyn compiler API. No need for Visual Studio, project files, compilers or anything like that. Just the scriptcs executable and a text file with your C# script code. Much like Node.js or Python for example. You know, scripting languages.
Turns out this idea took off like a rocket in the community and has all sorts of cool features by now, like Nuget integration and script packs for reusability. It’s awesome.
dotnetfiddle.net : It’s jsfiddle for C# code. It’s a web site where you can type some C# code in a console application, run it and see your output instantly. Great of small bits of test code. It even has intellisense support so it’s easier if to use than LinqPad for this kind of tests apps if you don’t know all the statements by heart.
devdocs.io: all web dev docs in one place and easily searchable. Contains docs for thing like the HTML5 spec, JS, HTTP, HTML DOM and the most popular frameworks like Ember, Backbone, Angular, Knockout and Underscore. Also language like Python, Node, Ruby etc. In short, useful stuff for any web developer working with a modern stack.
With the whole NSA PRISM storm blowing over the internet I thought it would be nice to compile a list of free and open source software I know that can help in safeguarding your privacy as an alternative to proprietary software or online cloud services which are not to be trusted with your personal data.
Hosting everything yourself is one way to go like the folks at unhosted.org suggest, but it isn’t free as it will a) cost you some money and b) usually quite some time to set everything up. Not everyone has the technical knowledge to do this either, so a list of open source software and trustworthy services for the masses would be great.
Turns out prism-break.org is just that kind of list, so that saves me the trouble of compiling it myself. Nice. Here’s another one with mostly the same items on it. Mostly.
While cleaning up an old machine I was first using CCleaner from Windows to wipe some partitions because DBAN crashed for some reason on it. To clean some of the Linux partitions on the drive which Windows can’t access, I dropped them so I could re-add them as NTFS partitions for further wiping. Problem was I forgot those partitions where also hosting my master boot record, so when I rebooted to confirm my partition changes… I ended up with a unbootable system.
Now I had to find a way to wipe those disks from Linux, but first I still wanted to get access to my WinXP setup. I could have just nuked it from orbit (read: boot from a Linux Live CD and shred it) but I was just wondering if I would manage to get it to boot again, just in case I do this on a system that really matters some day. So I started browsing to the ISO’s available on the Universal USB Boot installer and ran into the awesome Trinity Rescue Kit.
I installed it on a very small USB drive (265MB) I had lying around and managed to rewrite me a Windows boot record with the tools supplied from the text-based menu. Nice! I also noticed that it has a bunch of disk rescue tools on board like a backup tool, full NTFS support, the Midnight Commander explorer for file recovery and a Windows password reset tool (hackedy-hack). On top of that it also has a virus scanner on board, ways to set up network file shares and good, detailed documentation.
This distro is certainly one that is getting a nice spot on my PC CPR tool belt. Without exploring all the goodness Trinity has to offer I’m sure it’s a huge time saver if you need to help out with a unbootable system or one seriously infected with trojans or virii. You can even use this to set up a headless file share server in no time if you want.
Google Reader is quitting on us and there doesn’t seem to be an alternative if you don’t want something that tries to make your feeds look all fancy and shiny eye-candy-ish like Feedly or most of the alternatives I saw.
The things I loved in Google Reader are:
1. Accessible from anywhere (which means web-based basically), so desktop based RSS readers didn’t cut it.
2. I can use it from my Android phone, either with an app or straight from the website.
3. I can skim feeds quickly and star or tag articles I want to read later.
4. The read-later articles need to be imported into Instapaper, using something like IFTT.
I started looking at some open source solutions because I didn’t want to end up getting shut down again. In the least the services needed to allow me to import & export feeds easily in case it does bail out.
I noticed a few open source applications running on PHP that are interesting but only one of them is still actively developed and has a decent user base. So Tiny Tiny RSS is what I ended up testing out.
It’s pretty close to Google Reader (which makes sense because it’s an RSS aggregator and reader after all) but it isn’t pretending to become it, or implement every GR features. It’s sailing its own course, but since it’s pretty damn close I thought I’d give it a shot.
So here comes the geeky bit:
Since this is a web app and not a web service, you have to host it yourself.
So this means getting the code, uploading it to your server, setting up the database and configuring it.
If that didn’t scare you off, all of this is nicely explained in this lifehacker post and on the TT-RSS installation notes. So you’re pretty safe there. Recently the software was updated to enable it to run on a shared hosting server, so you can basically run it anywhere from now on.
If I wouldn’t have my own hosting I’d try to get it running on a NearlyFreeSpeech site to try it out for cheaps. You can set up a PHP site quick and cheap over there if you have the know-how.
There’s and Android application on the market you can try for 7 days for free to connect to your instance of Tiny Tiny RSS (after you open up the API settings in the configuration) and it works great. It costs only a few bucks so I figured I was willing to pay that to the author of this fine piece of work that’s available to the world for free after all.
It also supports starring and tagging posts, and it allows you to expose your starred items as an RSS feed so you can pull that into IFTT for syncing with Instapaper.
There you have it. All requirements are met with free software (except the Android app bit) and a bit of geeky work on your part to get things set up and running. So far things are running great and I didn’t run into any issues yet.
You can set this up for multiple users, so if you have friends that are also orphaned by Google Reader you can share your instance with them.