Skip to main content

Posts

Showing posts from December, 2014

rDNS to Burn Ho Ho Ho

Every year, like clockwork, someone makes sure to do something clever like this. Dont forget to set your max ttl to a little over 100 so you get ALL the lyrics. You don't want to miss out on a Christmas miracle. $ traceroute -m 120 xmas.futile.net traceroute to xmas.futile.net (77.75.106.106), 120 hops max, 60 byte packets 1 ec2-50-112-0-86.us-west-2.compute.amazonaws.com (50.112.0.86) 1.700 ms ec2-50-112-0-82.us-west-2.compute.amazonaws.com (50.112.0.82) 2.160 ms 2.121 ms 2 100.64.1.143 (100.64.1.143) 1.287 ms 100.64.1.157 (100.64.1.157) 1.850 ms 100.64.1.179 (100.64.1.179) 1.514 ms 3 100.64.0.114 (100.64.0.114) 1.697 ms 100.64.0.56 (100.64.0.56) 1.431 ms 100.64.0.66 (100.64.0.66) 1.637 ms 4 100.64.16.89 (100.64.16.89) 0.816 ms 100.64.16.29 (100.64.16.29) 0.870 ms 100.64.16.153 (100.64.16.153) 0.929 ms 5 205.251.232.166 (205.251.232.166) 3.181 ms 2.279 ms 54.239.48.184 (54.239.48.184) 1.175 ms 6 205.251.232.154 (205.251.232.154) 1.731 ms 1.315 ms 205

Apache VirtualHost Proxy Configuration - Helpful for Tomcat, Node.js and similar frameworks

I recently came across this question on ServerFault: " I've subsonic application running of [sic] tomcat. Everything else works on apache. I don't want to write port number everytime [sic] so I'd like to set-up [sic] a simple directory where subsonic will be accessible. So, I'm trying to make virtualhost file [sic] inside apache dir. [...] I tried many variations, but cannot make anything work. " The poor chap than [sic - ha!] provided an example of his latest go at the problem, an excerpt from his httpd.conf file: <VirtualHost *:80> DocumentRoot /var/www/streamer ProxyPass / http://mini.local:4040/ ProxyPassReverse / http://mini.local:4040/ </VirtualHost>   Not sure a bad go of it, all thing considered. Still, it wasn't providing him with the sort of results he was looking for. Naturally I had encountered similar issues not long ago myself, with the implementation of a Ghost blogging soft

University of Sydney Uses XTF to Index 60's Sci-Fi Comics

I grew up reading pulp science fiction. There was a time when I would never had admitted something like that in public. But times have changed. Computer programming is now a career instead of a bizarre waste of time that might get you arrested. People wear and fiddle with mobile computers; displaying them at coffee shops like peacock plumage. When I was a kid and told adults I liked computers they assured my parents it was a phase I would grow out of. As bitter as I may be of the past, I was delighted to find that the University of Sydney Library had combined my youthful passion for computers and science fiction comics into one mammoth project of love. They digitized the Frontiers of Science , a comic strip which was a big deal in Australia in the early 60's by way of the Sydney Morning Herald. But they did more than just scan the damn things. Any unpaid intern can do that. Instead, they relied on the eXtensible Text Framework (XTF) in order to provide contextual search capabili

Symlink Analyzation Function in C

Here is a simple function for performing symlink analysis using C.  The readlink function gets the value of the symbolic link filename. The file name that the link points to is copied into buffer. This file name string is not null-terminated; readlink normally returns the number of characters copied. The size argument specifies the maximum number of characters to copy, usually the allocation size of buffer. There is significant utility for such a function in a variety of contexts. Have fun with it! h/t Tanguy

Windows 7 and Windows 8 Basics: Searching by File Size, Modification Date and Other File Properties

It was one of these days, not long ago, that I work up one day and realized that I had become an Old Man. Mine is the last generation that remembers a time prior to the internet. I remember using acoustic couplers. My first laptop, a Toshiba, had dual 5 1/2 inch floppy drives, but had no hard drive. I was so excited when I got my hands on that machine. It meant I could connect to networks using my acoustic coupler from a pay phone! My ruminations on aging is at least somewhat related to the topic at hand. You see, among the memories rattling around my grey hair ensconced head are a few about searching Windows file systems for files of specific types. This sort of thing is very important, even just for every day normal computer usage. When your computer starts running out of space, wouldn't it be nice to be able to find all of the really large files on that computer? Or perhaps you are looking for an important document you wrote - you can't remember the name of the file but

Ghost Blog Platform - Automatic sitemap.xml File Creation

There seems to be some mis-communication making the rounds about the new node.js-based Ghost blogging platform's ability to automatically generate a sitemap.xml. As of August of this year (2014), automatic sitemap.xml file generation is a core feature, not a plugin. The new documentation on Ghost's development roadmap on Trello makes this clear: But, if your like me and usually check on this sort of thing by browsing through the forums, its easy to get the idea that sitemaps will be handled in some nebulous, future plugin: I'm fairly new to working with node, and my forrays with Ghost are partly an excuse to learn a bit more. So far, I like what I see. Its true Ghost isnt as mature as say, Wordpress, but it also doesnt have the same target painted on its back (ever go through your server logs for bad requests for wp-admin.php?), and a lot of what is not there or not built well I can re-do myself. Anyone else jumping on the node.js blogger bandwagon, either wi

Nah, I smoked a joint

Click to Enlarge h/t to Matt Bors

GDB Hash Script in C

Here is a very simple implementation of a GDB hash algorithm as written in C. The script accepts a single contiguous string of any size as input via command line argument. You can easily use a file as input using a pipe or redirect. For example:     #./gdb_script < input_file.txt or     #./gdb_script thisismystring Each character in the string is input as a non-contiguous block of integers, for simplicity in reviewing output. Enjoy!

Dynamically Assign Filenames within an Iterative Loop

This question came up on Stack Exchange ; Using C, how can you write filenames dynamically using an iterative variable loop? Or in English, you want to write some stuff to a bunch of different files, and have those files named in a logical manner like file1.file, file2.file, file3.file, ... etc. The answer is pretty simple, but a bit of a mind-bender when you are first getting started. I was also pretty astonished that all of the accepted "solutions" to the problem failed to compile. This is a pretty big issue on these programming solution websites. I think the reason for the problem is there are two groups of people: There are the people who want other people to think they can fix stuff. Then there are the people who can fix stuff. The two groups, obviously, have some overlap: people who can fix stuff and who want others to know about it. But there is also a statistically significant portion of both groups that do not overlap - people who can fix stuff who don't care

Barack Obama on Sorting Algorithms

Watch a pre-Presidency Obama chat with Eric Schmidt of Google about sorting algorithms. Oh, how you've changed, Barry.

The Sounds of Sort

The video below provides a graphical display of a number of different sorting algorithms at work. Whats unique about this video, is that in addition to the graphical display, each operation in the sorting algorithm has also been assigned a tone - in other words, this video lets you hear the algorithms as well as see them! While counter-intuitive, the "song" that the tones play can provide insight into how the algorithm is working; at least for me, it is easier to distinguish small differences using sound than it is to do so using the often frenetic, fast moving images in sorting visualizations.  Check it out for yourself!

Asymptotic or "Big O" Notation for Understanding Algorithm Performance

What does it mean for an algorithm to be "fast" or "efficient"? When we say an algorithm is fast, we are not referring to an explicitly notation in time, like seconds or minutes. There is a distinction here because of the distinction between hardware and software - performance of a program in real time can be drastically impacted by the hardware it is running on. In order to account for this distinction, while still providing an objective measurement for the efficiency of a program, computer scientists rely on Asymptotic Measurement and a notation format called Big O Notation to describe such measurements. The formal description as a formula is as follows: f(x) ∈ g(x) x o C f(x) ≤ C • g(x) x > x o In less theoretical terms; as the size of your input increases toward infinity, how does the runtime of your program grow? For example, imagine counting the number of characters in a string in the most simple way, by reading each character and summi

Apache Log Pong

Looking for an apache log visualization program recently, I came across logstalgia. It turns your log files into a game of Pong between your web server and the internet, with each new request being the ball going back and forth! So cool.

Eric Garner's Last Words

Every time you see me, you want to mess with me. I'm tired of it. It stops today. Why would you...? Everyone standing here will tell you I didn't do nothing. I did not sell nothing. Because everytime you see me, you want to harass me. You want to stop me [ garbled ] Selling cigarettes. I'm minding my business, officer, I'm minding my business. Please just leave me alone. I told you the last time, please just leave me alone. please please, don't touch me. Do not touch me. [ garbled ] I can't breathe. I can't breathe. I can't breathe. I can't breathe. I can't breathe. I can't breathe. I can't breathe. I can't breathe. I can't breathe.

WonkaLeaks

Paid FBI informant , accused sex criminal and convicted embezzler Sigurdur Thordarson , who was paid thousands of dollars by his DOJ handler for 8 hard drives filled with internal Wikileaks documents , bears an uncanny resemblance to Augustus Gloop from Willy Wonka. Coincidence, or something more sinister ? Augustus Gloop , formerly of Willy Wonka's Chocolate Factory Sigurdur Thordarson , formerly of Wikileaks