Archive for the 'UNIX' Category
I’m going to try and blog more frequently in short entries. I’ve been very busy with school and I’ve had little time to write anything or do anything outside of school work.
On a side note, here’s a cool shell trick I recently learned (note: I’ve only tested this on zsh). If you mistype a command, […]
Want to know how many lines of code your project is? Run this command:
find . -name ‘*.[hm]’ -exec cat {} \; | wc -l
Note: Header files in your project build directories can skew the result, you might want to empty out your build directories before running this. Change the file extensions in [hm] if you […]
Today I had a weird problem where copying and pasting stopped working. Since I really dislike restarting, I messed around and found a solution:
Run this in the Terminal:
ps -x | grep “/System/Library/CoreServices/pb[s]”
I got a result like this, if you don’t get any results skip the next step:
20829 p0- SN 0:00.28 […]
Most people probably aren’t going to care about this, but I want to share this so no one else has to go through the same pain. A few things are fairly hackish, but hey, it works. Much thanks goes to Nicholas Riley in helping me figure this out.
Download the cyrus-sasl tarball from http://asg.web.cmu.edu/sasl/sasl-library.html
The newest version […]
Here’s a cool trick that converts man pages to postscript and opens the file in Preview. Add this to your .tcshrc file in your home directory:
alias preman ‘man -t \!^ > /tmp/\!^.ps; open /tmp/\!^.ps’
Then to open man pages in Preview type:
preman NAMEHERE
I discovered the incredibly useful unix program screen just recently. It allows multiple terminal sessions running at once and it provides easy access for switching between sessions. To run the command type:
screen
Once screen is running you can do Control-AC to create a new window and use Control-A followed by a number to switch to that […]
Search
About
You are currently browsing the Ronge weblog archives for the 'UNIX' category.
Longer entries are truncated. Click the headline of an entry to read it in its entirety.Latest
Archives
Categories
- Cocoa (15)
- Cool (10)
- General (14)
- General Programming (13)
- Kiwi (24)
- Mac OS X (15)
- Software (11)
- Uncategorized (2)
- UNIX (7)
