• SQL

    Convert a SQL Dump to Excel

    The attached script can be used to migrate data out of a sqldump and into csv and xls for further analysis or ETL’ing. The name of each table is used to create a separate csv file (e.g. table1.csv) and an xls representation of each table is put into a workbook in a spreadsheet. The script requires Python 3.7. So if you’re on a Mac you might need to install that. Here, we use Homebrew to do so: brew install python3 Then you’d need to install the specific mods: python3 -m pip install pandas

  • SQL

    Install MySQL On OS X

    OS X might be the easiest platform to install MySQL on. To do so, simply download the MySQL installation package from the MySQL Download site. I like to use the third link (the DMG). Once downloaded, run the package. The package will ask you a few questions and you can easily just select the default choice during the installation process. Once installed, you’ll be prompted that a temporary password has been used for your MySQL instance. The password will get you in the first time, so you can change it. Once you have documented the password, open System Preferences and click on MySQL in the bottom row of System Preference Panes. Click Start…

  • iPhone,  Mac OS X,  Mac OS X Server,  MobileMe,  Network Infrastructure

    Use libimobiledevice To View iOS Logs

    Xcode and other tools can be used to view logs on iOS devices. One of those other tools is libimobiledevice. I usually install libimobiledevice using homebrew, as there are a few dependencies that can be a little annoying. To install homebrew if you haven’t already, run the following command: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Once run, follow the prompts to complete the installation. Once homebrew is installed, run the following brew command to download the required components and then libimobiledevice: brew install -v --devel --fresh automake autoconf libtool wget libimobiledevice Then run ideviceinstaller: brew install -v --HEAD --fresh --build-from-source ideviceinstaller Once these are installed, you can plug in a paired…

  • Mac OS X

    Fixing Color Problems with Ubuntu

    The Terminal application defaults have a problem passing colors with Ubuntu and other types of Linux machines with properly formed .bashrc files. This is because those systems do not know how to interpret the Lion xterm-color256 terminal declaration. The fix is to change this setting to xterm-color. This needs to be done for each Terminal default. Click on each (Basic, Grass, Homebrew, etc) and then click on the Advanced tab. From there, just set the Declare terminal as: to xterm-color and close. This can also be done through the command line. These settings are stored in the com.apple.Terminal.plist per user, in their ~/Library/Preferences. The key for each is in TerminalType,…

  • Mac OS X,  Mac OS X Server

    Mac OS X 10.5: The New Terminal

    I originally posted this at http://www.318.com/TechJournal Apple has been slowly winning over a lot of traditional Unix and Linux converts. This new breed of switcher is after a cool shell environment. In Leopard, Apple has upgraded Terminal.app to provide a whole slew of new features that are sure to continue winning new converts. Let’s just take a look at a few of them: Secure Keyboard Entry – Prevent other applications from detecting keystrokes used in terminal. Enable this using the Terminal menu. Tabbed Interface – I always have 3 shell windows open. That’s how I roll. But with the new tabbed interface (which you can access using the Command-T keystroke) I find…