Lion Ain't So Bad

I've bashed on Lion in the past but it's getting better. I'm getting used to the gestures for lack of the old methods I'm used to. Still wished it was an option, as the glitches appear to remain, but I'm getting used to Mission Control now, what was once called Spaces.

Expose and Spaces Alternatives

I've been looking for a suitable Expose and Spaces alternatives for Windows 7. The following is a list I've compiled.

Expose

Spaces

Steve Jobs

I own two Apple products: Macbook Pro and the lastest generation Macbook Air.

I used to be a PC/Linux fanboy. This quenched my thirst for server side and command line stuff. Uber geeky.

When I found out OSX was based off of Unix, I knew I'd eventually want to try it out. After playing around with a few Macs, it was inevitable that I would fall in love. It was the combination of a great UI produced by the genius mind of Steve Jobs that was truly enamoring. Been a fan since.

Steve's passing leaves me genuinely sad.

OSX 10.7 aka Lion Sucking Right Now

So far, I'm not too fond of OSX 10.7, otherwise known as Lion.

Particularly peeved that I can no longer just install Xcode from a downloaded package. Seeing as to what people have been complaining about on Apple Store regarding the stability of the installation, I sure as hell hope it doesn't bomb out on me. I just wanted to compile something with gcc...like macports.

Argh...

NRG2ISO

Code to convert an nrg file to an iso.

Download, compile, run. Drag into /usr/bin and it's runnable everywhere, like on okeanids.

Reference: http://gregory.kokanosky.free.fr/v4/linux/nrg2iso.en.html

TODO: Post downloadable bin files for various *nix based OS's.

Visual Studios 2011 Lightswitch

http://www.microsoft.com/visualstudio/en-us/lightswitch/overview-videos/...

Looking pretty awesome. Gonna definitely want to try this out. More details later if I ended up building something.

Downloading my copy from MSDN.

Been A Crazy Couple of Weeks

It's been a crazy couple of weeks at work. Product finally went live. Probably put in 50-70 hours each week over the course of three weeks to get things done. Chilling at work now, getting ready for the next project.

Talked to my friend tonight, surprisingly. Got me into HDR photography again. Check out his work on the blog roll, "Interesting Stuff".

Design Patterns - Chapter 1 Summary

Chapter 1 introduced the concept of design patterns, basically techniques others have formulated to solve a given set of problems. The idea is simple: a lot of problems exist: just find a pattern that matches the problem and you've pretty much solved it.

It also went into GoF, or the Gang of Four, folks who initially published the book of 23 patterns back in 1995.

NOCOUNT

For the life of me, I couldn't remember the flag that minimizes traffic on a mssql call. I needed to know this in order to look up if mysql had an equivalent.

MSSQL

SET NOCOUNT ON prevents the sending of DONE_IN_PROC messages to the client for each statement in a stored procedure. For stored procedures that contain several statements that do not return much actual data, or for procedures that contain Transact-SQL loops, setting SET NOCOUNT to ON can provide a significant performance boost, because network traffic is greatly reduced.

Installing ODBC for PHP on Linux

Running Fedora/RHEL.

  • yum install unixODBC* - Grab the dev packages
  • yum install freetds* - Grab the dev packages
  • recompile PHP source with pre_configure file
    • ensure that you specify flag --with-unixODBC=/usr

Configure an /etc/odbc.ini with something similar to the following:

17 [dsn_aws_shamrockdb]
18 Driver = /usr/lib/libtdsodbc.so
19 Description = shamrock aws database
20 Trace = No
21 Server = 123.123.123.123 #IP address, remove this comment
22 Port = 1433

nc

Listening Machine

nc -l 1234 > something.file

Sending Machine

cat somethingelse.file | nc [ip address] [port]

Writing README

Writing README files are important. Duh.

Three parts:

Act 1 - Considering this is open source, there are probably tons of other projects similar. Use this section to differentiate yourself from the competition. Why should people use your source?

Act 2 - For small to medium, your whole API really should be documented here.

Act 3 - Get out quickly. Keep it short. Thanks.

Write it first.
Immergent design - excuse to not design all all.

Matt Parker, IgniterRails on Youtube.

Other mentions: rdoc (forking), yardoc (forking).
Cucumber -> horrible wiki.

MySQL - Purging Log Files

Was working with the server today and things stopped uploading. New folders couldn't be created. This was indicative of a disc being too full. Ran df -h and noticed we were indeed out of space. du -ch --max-depth=1 a couple of times identified that /var/lib/mysql was huge. Turns out, binary log files were the culprit.

Tried to log into mysql but the pid file was still there. Manually deleted a few log files, restarted up MySQL, ran
reset master
and all was well again.

Using sed and Bash While Loops

#!/bin/sh
#
# This file was made exclusively to work in conjuction with other scripts to mirror the online store.
#
# Goes through each filename fed from the command line and does the following.
# 1. Replace '..' with '/' because wget rewrites all the "mirrored" domains.
# 2. Replace 'https://' with '/' because certain resources point to https and it was a pain to set it up locally
# 3. Replace 'action="http://' with 'action="/' because we didn't want to really post to internet. Note the quotation is correct
#

Sending Email Via Command or Shell

$ mutt -s "Test mail" -a /tmp/file.tar.gz user@email.com < /tmp/mailmessage.txt

  • user@email.com - is the recipient
  • /tmp/mailmessage.txt - is the main body of the e-mail (read message from the file "mailmessage.txt")
  • /tmp/file.tar.gz - is an attachment (with option -a)
  • "Test mail" - is a subject line (option -s)

Resource: http://www.cyberciti.biz/tips/sending-mail-with-attachment.html

Syndicate content