New motor build… prepping for bottom end assembly part 1

Posted by & filed under 93 Hatch Blog.

I got my downpipe, dumptube, manifold, and turbo exhaust housing thermal coated.

Finished up my wiring harness for the most part.

Turbo with the thermal coated exhaust housing.

They powder coated my ECU lid for lulz

Pulled the wirelocks from my old 81mm pistons in prep for the new ones.

Got the motor on the engine stand.

Ready to assemble!

Argh wait nevermind, they sent the wrong rod bearings. Bah.

PHP Snippet: Check if page is included by another page or not

Posted by & filed under PHP, Programming.

Sometimes it is useful to know if a page has been included by another page or not, and then take action based on the result. A quick and handy way to accomplish this is to use a tenary operator to do something like:

$included = strtolower(realpath(__FILE__)) != strtolower(realpath($_SERVER['SCRIPT_FILENAME']));

Which will return true if it is included, and false if it is running as itself. Now, we are able to do something like:

if($included == false)
    echo 'derp!';

Linux: Find files greater than n size

Posted by & filed under Linux, Server Admin.

Recently I had a issue where I needed to clean up some disk utilization on a linux server. In order to find a list of larger files, I used the following find command from the root directory I want to recurse through:

find . -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

As you can see, the -size switch is setting the minimum size to find at 50Mb. Another issue that I ran into was deleting a large amount of files at once using something like:

rm -rf /var/my/path/*

“Argument list too large” was the error. Apparently the list of files is too large for rm to handle. I found that there are a variety of methods to solve this, from using loops to split up the files into smaller groups, to recompiling the kernel. One of the simplest is to use the find command to delete the files it finds:

find /var/my/path/ -name "*" -delete

The list of files to get deleted can also be tuned so it does not delete all the files in the path:

find /var/my/path/ -name "filename*" -delete

Snowstorm Success

Posted by & filed under .Net, Gaming, Programming.

We have a snowstorm!

After fixing some problems with my collision detection system, I got it working! It’s rough, but some added work on the physics side, and more tuning and it will be even sweeter!

Bones – The WordPress HTML5 theme for developers

Posted by & filed under Programming, Web Development.

Bones is a WordPress Theme for Developers — Built around the HTML5 Boilerplate, Bones is a rock solid foundation to start any WordPress project. Keep what you need, remove what you don’t. It’s totally up to you.
Bones is not a Framework — Frameworks are great, but sometimes they make things more complicated than they need to be. Bones is bare and as minimalistic as possible. It’s meant to be used as a per-project template, this means no Child Themes. Hooray!

Graphite – Scalable realtime graphing suite

Posted by & filed under Uncategorized.

Graphite is a highly scalable real-time graphing system. As a user, you write an application that collects numeric time-series data that you are interested in graphing, and send it to Graphite’s processing backend, carbon, which stores the data in Graphite’s specialized database. The data can then be visualized through graphite’s web interfaces.

Next Generation firewall port knocking

Posted by & filed under Firewalls, Networking.

fwknop stands for the “FireWall KNock OPerator”, and implements an authorization scheme called Single Packet Authorization (SPA). This method of authorization is based around a default-drop packet filter (fwknop supports iptables on Linux, ipfw on FreeBSD and Mac OS X, and PF on OpenBSD) and libpcap. SPA is essentially next generation port knocking (more on this below). The design decisions that guide the development of fwknop can be found in the blog post “Single Packet Authorization: The fwknop Approach”.

fwknop Hone:
SPA with fwknop: