NYC Resistor

We learn, share, and make things

Archive for the '*NIX' Category

Laser cutting from the command line

Epilog laser test
One of NYCR’s most popular weekly events is Lunar Laser Mondays using our Epilog mini-35 laser cutter. The only supported system is Windows with CorelDRAW and Epilog’s closed source driver, which doesn’t seem right for a hackerspace. Luckily, AS220 Labs has figured out how to talk to the Epilog using PJL. I’ve written a command line tool, epilog, that will translate the Postscript file into commands for the cutter.
Read more

3 comments

March Madness – March 1st App.

So, the folks over at Fubar Labs made a challenge to themselves and anyone else who wants to participate. Basically, write one program every day throughout the month of march. Any language, any function, but be creative. I doubt I can keep up the entire month, but it sounds like a really fun way to expand ones coding horizons and do some neat stuff. So anyways, here’s my first code for March Madness.

Read more

2 comments

Linux Learnfest TODAY!

htink will be hosting a Linux tutorial, today Tuesday, Jan 26 2010. Both Ben Combee and Myself have volunteered to assist. This will not be at NYC Resistor however, look for it at Bug Labs ( your friendly neighborhood purveyor of fine open source micro-controllers ). I do not work for British Telecom =P.

If you’ve ever wanted some guidance in the Unix world, this is a tremendous opportunity. The folks that will be available to you are all very talented. If you’re interested, more details HERE!

No comments

Another hack from the past… Kernel hacking.

cpuinfo

So way back in the 2.4 Linux kernel days I operated a shell server. It was kind of like a “proto honeypot”. We set it up to portray a bunch of fake information about itself. We then released it into the wilds of IRC claiming it was a “machine we just owned here have a free account.” Then we monitored the systems use via ttysnoop applications and pulled copies of anything uploaded.

The result was we pulled about 4 gigs of exploit archives. And a bunch of logs of people trying to figure out why their x86 exploits weren’t running on the DEC alpha that was pretending to be the wopr.

Anyways, one of the neat side effects of my playing with the proc file system was finding a limit on the upper bounds of top. By setting up procfs to displays stats for 1048 processors I managed to get top to collapse after one iteration of showing cpu usage stats. Added a fun screenshot to the gallery.

Among the fun easy things you can do to tweak your kernel, upping your jiffy count to present 16 years of uptime, and customizing your HZ values are the most fun. I remember running HZ at 1024 back when the rest of the world was rocking it at 100 and slowing themselves down massively. Kernel tweaks are fun, relatively easy, and a great way to learn. Be fearless, be stupid, and be prepared to watch stuff explode catastrophically. But, don’t be afraid to slash and burn and start anew.

No comments

2am iPod Sequencers

Widget and Hans stayed up til 2am hacking up some iPod sequencers at NYC Resistor. We are using pdPod on iPodLinux. You can hack your own iPods too, as part of the re-ware project, we are trying to make it easy: http://re-ware.org

Thanks to Bre Pettis for his camera work.

No comments

An Introduction to UNIX / Linux

This my advert for the Intro to UNIX class I’ll be hosting on March 21st ( Saturday ) from 1:00 pm to 4:00 pm.
code is available at: nycr.c
compile with : gcc -o nycr nycr.c -lncurses

Register here: Register!

Read more

3 comments

HTOP makes TOP look bad

I thought I’d make the first Software post to the blog. And since I am always on the hunt for good console, non-GUI, based applications to make my life easier, I thought I should share one of my findings.

For those of you who use ever used Linux or Unix in an environment where you only had access to a terminal, and you wanted to see an overview of system resources, you have probably used top. Top is nice little task manger that displays whats running, and its memory, cpu, owner and so on. But its ugly and a bit hard to understand. It looks something like this:

Unix Top

I don’t like it at all, and searching for a something to replace it, I found HTOP. Their website doesn’t really glorify how great this tool is, and their screen shots are blah, so here is one of mine.

HTOP

As you can see everything is pretty =). Shows you what all yours cores are doing, even in my beefy 8 core machine. The ownership of a process not only by the user, but by another process which called it. It also supports mouse clicks (one of the few terminal applications that do). And can be customized completely to your liking for each user on your system. In public spaces people are often wowed by it, because it looks so kick ass, especially in full screen.

It took some time to understand what the colors in the graphs were, so I’ll label them here. Red is system usage, blue is idle usage, and green is user usage.

This has been an application I have used almost daily for the past year. Its also a rare sight, as most console applications lack in the level of control that htop gives you. Enjoy it!

4 comments