• Mac OS X

    Command Line Calendaring

    When I need to look at what day a date is on, I typically open the Calendar app. But sometimes I’m in the middle of a task in the command line and don’t want to do so. Luckily, there’s a cal binary in OS X. To use cal, simply invoke it and ask for a julian calendar using the -j option: cal -j Which outputs a calendar view: March 2016 Su Mo Tu We Th Fr Sa 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 The days…

  • SQL

    Create A SQL Database

    So you’re ready to write some software? Or test some cool stuff. Or build something awesome. You can use the CREATE DATABASE statement to get started, by creating a database. To do so is pretty easy, simply run that statement followed by a name for the database (called Customers): CREATE DATABASE Customers; Once you’ve created a database, it’s time to create tables, which can be done using the CREATE TABLE statement. The Syntax of that statement looks something like this, defining a set of columns, their data type and the size of the column (in the form of a maximum length), all wrapped in parenthesis with each column separated by…