dig +short txt
Just replace
In this blog I will post usefull information that I come over within the technology sphere. As I mostly spend my time on OS X, the majority of the post will most likely be about the Mac platform, but anything that I find usefull might be subject for a post.
I am using XCode for some of my programming projects, and I would like to minimize the number of files in my SCM repository. The question is, which files are necessary for XCode to compile the project and which can be ignored?
You will of course need to add all your .h and .m files. The .xib (.nib) files should also be included. From what I have been able to figure out, you could put the following into your ignore-file (.gitignore if you are using git, as I am at the moment).
# XCode files that can be ignored
build/*
*.pbxuser
*.mode1v3
Also, it could be a good idea to add the following into your .gitattributes-file, in order to treat the project file as a binary file. This will make things easier if you get conflicts.
*.pbxproj -crlf -diff -merge
As I manage a couple of computers running Mac OS X (not all mine), keeping them up to date with the latest security and software updates can be a bit tiresome. This is especially true for machines I have to use remote control on in order to update. With slow Internet connections, the VNC-protocol can be a bit slow, in particular when the machine is also downloading huge security updates.
To help with this, I just found out that is possible to update the machine remotely (or locally) using the terminal. All you have to do is fire up the terminal, optionally ssh to the remote machine, and type in the command
sudo softwareupdate -i -a
This will download and install all available Apple updates. If you just want to see what updates are available, try
softwareupdate -l
Lifehacker hints on how to get your external IP-address from the command line. You can use either curl or wget, using either of the following commands:
curl -s myip.dk |grep '"Box"' | egrep -o '[0-9.]+'
or
wget -O - -q myip.dk |grep '"Box"' | egrep -o '[0-9.]+'
OS X do not come with wget preinstalled (it can be installed through e.g. Fink or MacPort), the curl version might be the most useful for OS X users.
Lifehaker has a great tip on how to use 'ls' to only show the subdirectories at the command prompt. When you know about it, it is kind of obvious (if you know some simple regexp), but a it is still very handy.
So, what you do is to type
ls -l | grep ^d
at the command prompt. This will only list your subdirectories.
As I am doing a bit of writing, I suddenly had the need to have line numbers in my LaTeX document. There is a really nice package called lineno that takes care of this very nicely. All you have to do is include the package, and put the command \linenumbers somewhere in your document. I placed the following two lines in my preamble:
\usepackage{lineno}
\linenumbers
You will find the documentation for lineno at ctan.
I find that I use Quicksilver for many things. I came over a post explaining how to print a file that is selected in the finder without opening preview or other programs. Quite handy.