Archive | Uncategorized RSS feed for this section

img2mpg – Batch convert JPEG sequences into MPEG movies

7 May

Do you have (or want) an IP camera that uploads video to an FTP server, but frustrated because all IP cameras seem to do is upload still frame JPEGs? Frustrate no more! I have written a Linux shell/bash script that timestamps and video-fies these images into video for your consumption.

Behold!

How to shut down a Windows server hung due to frozen VSS writers

6 May

Shadow copies and VSS writers are pains in the ass. Sometimes you’ll try to shutdown Windows and it’ll freeze for hours stuck at the “Windows is shutting down” screen because it can’t shut down the VSS shadow copy providers are also hung.

To get around this, I’ll usually shut down those servers with the ‘shutdown /p /f’ command. This force option seems to do the job nicely.

Basic Apache/PHP Start Page

5 May

When I set up a new website, I like to put a basic welcome page in the public_html folder to test that it’s working and look halfway decent. Here’s what I use. It just echoes the hostname from PHP, thus providing feedback that both Apache and PHP are working (along with DNS, hopefully)

Script for Adding Monitors in Nagios

16 Mar

It can be a pain to add new monitors in Nagios — so I made a script! Check it:

Visually Monitoring Asterisk (using simple digital signage!)

29 Feb

I’ve got this simple digital signage script floating around that I repurpose a lot. Recently added Asterisk logs to it, so I can see minor fluctuations and trends like lagged peers in addition to other stuff I’ve written like my Nagios monitor. Here’s the script! (more…)

Shift Register LED Matrix Kit!

14 Feb

Hot on the heels of my Arduino Nagios Display, I’ve made a kit version of the LED matrix that is much easier to assemble! It’s daisy-chainable, so you only need however many rows you want. Perfect for workshops where you want to introduce someone to shift registers and LED matrixes but don’t want to buy 80 LEDs per student, while letting them take home something useful yet expandable.

It uses the Arduino ShiftOut tutorial code with only slight modifications to the pin assignments. This allows the boards to be single-sided, meaning the traces are easy to follow for newbies to understand how everything works. It also allows the board to alongside an Arduino Ethernet with no pin conflicts.

The basic kit includes one shield and one strip. Additional strips can be added theoretically forever, but practically limited by the Arduino’s power supply, the shift registers, the circuit traces, and the characteristics of the LEDs and resistors.

If you’re interested in buying some, check out my brand-new store!

I’m also teaching a workshop soon that includes this kit. Below is everything included in that workshop:

Log your Logins – My favorite script ever

10 Feb

Reviewing my system, I realized one script I take advantage of the most is a logging script I made years ago to track logins.

I mainly use it to see who is using which computer, saving on guesswork and coming in very handy when troubleshooting weird problems. It also comes in handy when tracking down an asset or debugging login issues (i.e. if there’s no connection during login, it won’t write to the logfile.)

So here you go, in all its VBScript glory:

(more…)

How Do I Grant Least Privilege? Or, Help! I Think Someone Needs Admin Rights!

9 Feb

You may realize that giving out admin rights (i.e. adding someone to the Administrators group) is a bad thing. But your boss and/or favorite employee might be demanding that they need them in order to do their job. You feel stuck. What do you do?

First, you need to learn something: the Administrators group isn’t magic. The only reason it can do all the things it can do is because when Windows gets installed, it creates a group called Administrators and grants it a lot of permissions on files, folders, registry, and Local Security Policy entries.
(more…)

Why Should Users Not Have Admin Rights?

6 Feb

I recently waded into a debate about whether people in an organization should be given local administrator access to their machines.

Now firstly, this violates the principle of least privilege, which is what all of security is based on. You don’t get it unless you need it; you get the minimal privilege necessary to do your job. Imagine if cashiers could withdraw from the company account, if untrained boot camp grads were given missile launch keys, and if spies told their families everything. Security doesn’t work that way.

Still, it got debated, and someone finally asked what specific dangers they were putting their network in by giving certain people local admin rights.

It’s not a simple question, but I’ve come up with some examples.
(more…)

Death and Taxes

25 Jan

This is a comment I posted on Paul Gregory’s Forbes post about Mr. Buffet’s Secretary’s salary– saying that for her to be paying less than him (assuming a 15% rate) then she’d have to be making over $200k, meaning she’s not such a poster child for injustice after all. (I guess God only has pity for those making more or less than $200-500k?)
(more…)