The Cranky Sysadmin A world of technology, fun, and ignorant rants.

October 26, 2015

Developing Node in Emacs on Ubuntu

Filed under: Uncategorized — Cranky Sysadmin @ 8:00 am

I am impressed by my first impressions of node.js. It feels very Unix-like. If you want to develop node in emacs, a good place to start might be Truong TX blog. My setup differs a bit from his. You can find my whole emacs environment on github. Outside of emacs, you of course should have node and npm installed. I then installed Tern with ‘npm install tern -g’. The relevant snip from my emacs init is below

;; if you aren't running a package manager, you'll need to
;; require js2-mode, ac-js2-mode, tern-mode, tern-auto-complete
;; javascript using js2-mode and tern
(add-hook 'js2-mode-hook 'ac-js2-mode)
(add-hook 'js2-mode-hook (lambda() (tern-mode t)))
;; I have tern in a non-standard directory
(setq tern-command '("/home/FOOFOO/node/bin/node" "/home/FOOFOO/.node_modules/bin/tern"))
(eval-after-load 'tern
 (require 'tern-auto-complete)
(add-to-list 'auto-mode-alist '("\\.json\\'" . js2-mode))
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
;; if you don't want to warn on missing semicolons,
;; uncomment the following
;; (setq js2-strict-missing-semi-warning t)

I don't know why I never used yasnippet before, but I've been wasting a lot of time without it. Add the following above any auto-complete sections:
(require 'yasnippet)
(yas-global-mode 1)

And with that, you should be able to settle into some nice node tutorials.

October 19, 2015

What is this nodejs Thing You Speak of?

Filed under: Programming — Cranky Sysadmin @ 7:19 am

A very long time ago, I was interested in exposing javascript via apache in much the same way as mod_perl does. I got a working demo running based on (now dead) mod_snake code and the mozilla spidermonkey javascript engine. I abandoned the project due to other interests, but I still like the idea of serverside javascript. Now there is nodejs, which is a javascript engine based on the v8 engine. It has a reasonably complete standard library, and a nice package manager called npm. There is even a (old outdated) mod_node if you really want to hook it into apache. Node looks like it’s architected well and has good performance. If I were to judge a book by its cover I’d say node is worth learning and using.

April 24, 2015

Xubuntu 15.04 Emacs and Python Data Science Setup in Virtualenv

Filed under: Programming,System Administration — Cranky Sysadmin @ 1:20 pm

If you understand the title and want to see the instructions, see after the fold.

emacs and ipython and virtualenv oh my!

April 15, 2015

The Best Advice I Ever Received

Filed under: Life — Cranky Sysadmin @ 8:17 am

By quantity, my parents have probably given me the most good advice, but the most useful piece of advice was given to me over a game of chess with my English teacher, Mr. Matkowski. I had made some placeholder move. He shook his head and said to me, “Don’t do chicken shit moves”. That was 30 years ago and every time I do a chicken shit move, I still hear his disapproving voice in my head. I need to find him and thank him some day.

January 26, 2015

Rust and Project Euler

Filed under: Programming — Cranky Sysadmin @ 8:54 pm

I stumbled across a neat language called Rust recently.  What makes it interesting to me is that it’s billed as a replacement for C that is type safe and memory safe without a garbage collector. Rust has been ported to Arm Cortex M4 and the lack of mandatory garbage collector means that it should run well on constrained systems. Apparently it also has a good concurrency model, but I don’t know much about that yet. I also recently discovered Project Euler, which is a bunch of curated math problems. Well, now I’ve started solving the Project Euler problems in rust. If you’re interested, you can find the few problems that I’ve solved so far on github. They’re probably not ideal solutions since I’m not an expert at math, rust, or efficient algorithms, but one has to start somewhere.

January 17, 2015

Roped In

Filed under: Uncategorized — Cranky Sysadmin @ 2:34 pm

At our last meeting, the Pentucket Radio Association elected me to the position of president. I hope that I can represent them well.

The club participates in several events during the year and ultimately, I’ll be responsible for their success. Like many other local clubs, we have some recruitment and outreach challenges and I will need to attend to those as well. I’ll blog about the more interesting public facing stuff, names excluded to protect the innocent.

November 18, 2014

Catastrophe While Tapping the Last Hole

Filed under: Uncategorized — Cranky Sysadmin @ 5:48 pm

I finally tapped the last of the 38 holes for my milling table. On the last hole, I broke the tap because I was in a hurry and really bore down on the tap. I’m not sure there is an easy way to remove the tap, and I’m not going to waste the work piece. It looks like I’ll be staring at that broken tap for as long as I use the milling table. The good news is that it was a hole in the corner, so I’m not likely to need to use it often.

October 8, 2014

Still tapping holes

Filed under: machinist — Cranky Sysadmin @ 1:27 pm

The milling table is still a work in progress. Tapping the 3/8-16 holes by hand was a lot harder than I anticipated. I have about 12 holes left and at my current rate, I should be done in a couple of weeks. Some lessons I’ve learned are:

  • Ratchet taps are a lot easier than regular tap handles. $20 at harbor freight for one that has proved robust so far.
  • Even with a ratchet tap, tapping larger holes is hard on my hands and back.
  • A drill press with a laser is helpful for starting the hole and keeping it true. I use a chamfer bit to hold the tap into an indent in the top of the tap
  • Bolt down your drill press and clamp down your work securely. If you think it’s secure, it probably isn’t yet.

I use non-detergent motor oil as lubricant, and I back out a bit after each 3/4 of a turn. I’m sure professional machinists will shake their heads at my choice of lubricant, but that’s what I have on hand.

September 19, 2014

What I Learned Drilling 38 5/16″ Holes in Mild Steel

Filed under: machinist — Cranky Sysadmin @ 2:06 pm

I’m working on a milling table for my lathe based on drawings and plans from this forum post (Scroll to the bottom of the post). This required drilling a lot of holes and it’s my first experience drilling that much steel. Experts will have more technical observations, but I have some practical advice if you’ve never done any work in metal.

  • Don’t wear shorts and sandals. Those metal chips are hot and sharp. I got several slivers in my feet from wearing sandals.
  • Chips and oil go everywhere in a 5 foot radius from the drill press. No advice, just a warning.
  • Clear your work piece and table occasionally. The chips on the table can impact the drilling accuracy.
  • The wood pecker method really does keep the chips manageable. Drill a little and back out.
  • Start with a smaller diameter drill and work up. Use a center drill to start. This seems to work well.
  • My cheap drill press doesn’t have a lot of rigidity and it tends to vibrate a lot with bigger diameter holes. I wish I had bought a better one.

Now I have to tap all of those holes. I think that will probably take a lot longer than drilling them.

September 6, 2014

Projects for the Metal Lathe

Filed under: machinist — Cranky Sysadmin @ 9:21 pm

I got my lathe up and running and on a bench. It’s not an ideal setup, but it will do for now. The bench is one of the hardwood benches from Harbor Freight. It’s amazingly sturdy considering how cheap it was. My flat belt is just a serpentine that I cut to length and used homemade staples to stitch together. Many people use glue, but I couldn’t get a glue to adhere sufficiently.

Now that the lathe is running, it’s time for projects. The biggest project in my queue is a design from 1921 Popular Mechanics, A Small Bench Miller. It uses concrete for the structure. Before I build that, I have three other smaller tooling projects; a small boring / milling table for the lathe, a steady rest, and a couple of the stud gears that I’m currently missing (16 tooth and 24 tooth). I’ll post details on my projects as I complete them.

Older Posts »

Powered by WordPress