Nicer Music Posts

So, I found this awesome library called VexTab that allows you to write down musical notations in a simple syntax and generates a HTML5/javascript rendering of the notation. I have some little snippets to allow rendering chords and tabs with/without notations. This will be specific to Jekyll generated sites on Github, you can be much cleverer on your server. It’s almost too easy but here you go. How to include music notation in your blog – you can ignore raphael.js and chart/chord.js files if you don’t want chord representations. Put these files in your html from vexflow/vextab projects. <script src="/js/raphael.js"></script> <script src="/js/jquery.min.js"></script> <script src="/js/underscore-min.js"></script> <script src="/js/vexflow-min.js"></script> <script src="/js/tabdiv-min.js"></script> <script src="/js/chord.js"></script> <script src="/js/chart.js"></script> <script src="/js/music-post.js"></script> ...

April 14, 2013 · 2 min · NextDoorHacker

Organizing Research Papers

I keep finding myself asking this question way too often I definitely read that in a paper (or, blog post, quora article) a while back, where was it? Most often it’s either in one of my moleskine notebooks (seriously, those things are incredible - I keep two), date stamped with some scribble or on Evernote. I don’t get annotations and in-place notes. I like to scribble on the side a fair bit and annotate. While iAnnotate apps work, I can’t save that to Evernote yet, while keeping it editable. While I’m pretty sure Evernote or Dropbox can be adapted to do all of this with some cleverness or discipline, but here’s some of the research I did on how to organize your documents, research papers. ...

January 31, 2013 · 4 min · NextDoorHacker

Wi Fi Diagnostics, monitoring tool in OSX

I recently found this hidden/undocumented tool (at least not in Network Preferences) in OSX while trying to debug some wireless connectivity issues at the house. Most modern Linux distributions already come with a few of these tools to do monitoring, watching when the network drops, or just monitoring signal vs noise ratio. I wont go into the detail of how to do that with Linux (perhaps another blog topic). If you want to checkout the Linux side, you might want to start here . ...

January 5, 2013 · 2 min · NextDoorHacker

Moving on to Jekyll Bootstrap

So, I finally decided to port this site to Jekyll-Bootstrap along with a bunch of other projects. There are some helper functions in Jekyll Bootstrap that I find very convenient to use. Particularly since I’m using ruby/rake all the time, it’s easier to just run the rake post command to just post whatever you need to. I’ll add a few more things in the future. Right now, I’m just testing a bunch of things and didn’t exactly pay much attention to making the site look good. ...

December 10, 2012 · 1 min · NextDoorHacker

Abusing Git pre-commit hooks for fun and profit

So, git pre-commit hooks are executable files (yes, you have to declare them as chmod +x - for some reason I forget this every time I write hooks) that are run right before you commit. This type of stuff lets you verify that your application is working, run a few tests, etc before it gets committed. At least the current use case I have (that probably illustrates the point of this particular hook fairly well) is related to this website. So, as I started working on this, I realized that categories are implmented as user plugins which aren’t allowed by github-pages for security reasons. Since all I’m doing is generating a static website, that doesn’t really matter as long as I copy the categories directory to the root, right? Why not automate that shit? ...

January 19, 2012 · 2 min · NextDoorHacker

PHP isset with variable name

I wont try to justify PHP hacking but I was working on a project that’s based on CodeIgniter. It’s on a cycle of heavy refactoring. I was wondering if I could do something like isset("variable_name"); similar to python "variable_name" in globals() Same idea with locals() in python. Thankfully, php has the equivalent of globals() being $GLOBALS which would return you all the variables declared so far. Now you can just write your own isset_varname(). get_defined_vars() is equivalent in php to locals(). in python. ...

January 18, 2012 · 1 min · NextDoorHacker

New Blag - how I learned to stop worrying and love Jekyll

So, I’ve been thinking about this for a while and I finally decided to pull trigger on moving my site fully to github. Let’s see where this goes. Also, I want to give a little intro on how to build a site like this (very bare-bones right now, I’m not very fancy). Originally, nextdoorhacker.com was running on a Linode box that I owned since 2008 (summer of freshman year, oh the times), since I was doing a lot of PHP around then, I ran wordpress on it. Later on, I ran 4legs.org on it along with a wide-assortment of side projects. But wordpress tends to get really annoying to manage if someone isn’t paying you to do it. For me, blogs have always been luxury. So signing in, writing some stuff in a textbox, obsessing over the typeface, getting annoyed over wordpress messing up the format and above all, keeping up with the security patches, new versions becomes work for a blog that probably total of two people ever read. ...

January 16, 2012 · 2 min · NextDoorHacker