Tiny Deathstars of Foulness

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 a comma: CREATE TABLE nameoftable ( column datatype(size), column datatype(size), ); So to create the Customers table that we’ve been using through these articles, we’ll use the following SQL Statement: CREATE TABLE Customers ( ID integer(255), Site varchar(255), Contact varchar(255), Address varchar(255), City varchar(255), Zip integer(255), Country varchar(255), ); Columns are created with data types. In the previous example, we named columns of integers and varchars. The available data types include the following:
  • CHARACTER: A string of characters using a defined length
  • VARCHAR: A variable length string of characters using a maximum length
  • BINARY: A binary string
  • VARBINARY: Binary string in a variable length, with a defined maximum length
  • INTEGER: A number with no decimals
  • SMALLINT: A 5 digit or less number with no decimals
  • BIGINT: A 19 digit or less number with no decimals
  • DECIMAL: Number with decimals
  • FLOAT: Floating number in base 10
  • REAL: Number
  • DOUBLEPRECISION: Approximate number
  • DATE: Year, month, and day in separated values
  • TIME: Hour, minute, and second in separated values
  • TIMESTAMP: Time in the form of year, month, day, hour, minute, and second
  • INTERVAL: A period of time
  • ARRAY: Ordered collection of data
  • MULTISITE: Unordered collection of data
  • XML: Stores XML

February 15th, 2016

Posted In: SQL

Tags: , , , , , , , , , , , , , , ,

For many environments, securing OS X is basically trying to make the computer act more like an iOS device. Some of the easier tasks involve disabling access to certain apps, sandboxing and controlling access to certain features. One of the steps en route to building an iOS-esque environment in OS X is to disable that Go to Folder… option. To do so, set the ProhibitGoToFolder key as true in defaults write ProhibitGoToFolder -bool true Then reboot, or kill the Finder: killall Finder To undo, set the ProhibitGoToFolder as false: defaults write ProhibitGoToFolder -bool false

November 11th, 2012

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , , ,

The Mac App Store has a debug menu. To enable the debug menu, enable the ShowDebugMenu key in To do so:
defaults write ShowDebugMenu -boolean YES
Once enabled, there are a number of options to show the folder where apps download, enable logging, clear cookies and reset the Mac App Store.
To turn the Mac App Store debug menu back off:
defaults write ShowDebugMenu -boolean NO

January 5th, 2012

Posted In: Mac OS X, Mass Deployment

Tags: , , , , , ,

When Lion was new, I put up a post about clearing out information on saved applications states. Saved application states are a new feature in Lion that remembers the screens that were open and where each was when you quit applications. The reason for that post was that those states were causing a few minor issues with applications. There are a few applications that the saving of application states is really awesome for. I think it will mostly be different for each persons workflow. Personally I like saving the state of Terminal, Safari and a few others. However, the state of some others can be a bit annoying for me. For example, Word. Luckily, you can control which applications have saved states and which do not. To do so, first find the application in ~/Library/Saved Application State. These usually are the bundleid of the application followed by .savedState. Using the bundleid (or whatever is listed if not the bundleid), you’ll then send a NSQuitAlwaysKeepWindows key to the defaults domain for that id with a boolean setting of true or false. For example, to disable the saved state for Microsoft Word: defaults write NSQuitAlwaysKeepsWindows -bool false To re-enable it, just send a true value into the same key: defaults write NSQuitAlwaysKeepsWindows -bool true

September 16th, 2011

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , , , , , ,