Programming Puzzles & Code Golf Stack Exchange is a question and answer site for programming puzzle enthusiasts and code golfers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Often, I find myself running a script or query that will take a significant amount of time to run. I can leave that script open and enjoy some guilt-free procrastination.

Now, what if I could write a script that seems to be one of the above scripts to any onlookers, but in looks only? I could put it up on a screen and enjoy days of kitten livestreams before anyone realised that all the complicated rigmarole on the screen didn't have anything to do with my actual job.

Your challenge is to write this script for me (yes, I'm that lazy).

A good answer will:

  • Make something appear on the screen that looks like a script is doing work. "Screen" can be terminal, browser, etc.
  • Be fairly original (yes, we've all seen the neverending progress bar programs)
  • Survive cursory examination by a technical person

A bad answer will:

  • Get me fired
  • Rehash something we all were forwarded in the 90's

A stellar answer might:

  • Transcend one of the bad bullet points above (for instance)
  • Survive critical examination
  • *gasp* actually do something that's useful or aids in my work shirking

Acceptance will be based on votes, with bonus from real-life results. I will actually run these scripts (Linux Mint 16) at work when my screen is visible (meetings and the like) to determine detection. If anyone notices that it's faking, you're out of the running. If someone comments on how hard I'm working, +5 bonus upvotes for you.

"Useful" in this case can apply to any coder, but if you're looking for that extra shine on your teacher-bound apple, I'm a full-stack webdev who works in code roughly according to my tags.

Question partially inspired by this.


Disappointingly, I didn't get any comments either way on these entries. They're all awesome, so you're all winners in my heart. However, Loktar has the most votes by a long shot, so he gets the +15 from the accept. Congrats!


locked by Alex A. Apr 15 at 3:55

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

What's the winning criteria, popularity-contest? – Kyle Kanos Jun 7 '14 at 1:37
So... what happens if you test an answer and it actually does get you fired? – Bob Jun 7 '14 at 11:28
This gives me an idea for another code golf question. "Make it look like my question shouldn't be put on hold" – twiz Jun 7 '14 at 13:26
Just write one of these programs, and compile! – ugoren Jun 8 '14 at 19:15
I saw a really good remake of the Tron Legacy boardroom on Github the other day: – Chron Jun 9 '14 at 4:40

33 Answers 33

up vote 293 down vote accepted


So I went a little crazy with this. I did it between breaks from working on my GUI to track IP's using Visual Basic.

You can access it by going to the super serious domain I made for it tonight as well so you can look busy anywhere Gui Hacker and fork and create your own from the following sources

Basically, if you have this running no one will bother you because they know you are doing some serious stuff.

var canvas = document.querySelector(".hacker-3d-shiz"),
  ctx = canvas.getContext("2d"),
  canvasBars = document.querySelector(".bars-and-stuff"),
  ctxBars = canvasBars.getContext("2d"),
  outputConsole = document.querySelector(".output-console");

canvas.width = (window.innerWidth / 3) * 2;
canvas.height = window.innerHeight / 3;

canvasBars.width = window.innerWidth / 3;
canvasBars.height = canvas.height; = (window.innerHeight / 3) * 2 + 'px'; = window.innerHeight / 3 + 'px'

/* Graphics stuff */
function Square(z) {
  this.width = canvas.width / 2;
  this.height = canvas.height;
  z = z || 0;

  this.points = [
    new Point({
      x: (canvas.width / 2) - this.width,
      y: (canvas.height / 2) - this.height,
      z: z
    new Point({
      x: (canvas.width / 2) + this.width,
      y: (canvas.height / 2) - this.height,
      z: z
    new Point({
      x: (canvas.width / 2) + this.width,
      y: (canvas.height / 2) + this.height,
      z: z
    new Point({
      x: (canvas.width / 2) - this.width,
      y: (canvas.height / 2) + this.height,
      z: z
  this.dist = 0;

Square.prototype.update = function() {
  for (var p = 0; p < this.points.length; p++) {
    this.points[p].z -= 3;
    if (this.points[p].z < -300) {
      this.points[p].z = 2700;

Square.prototype.render = function() {
  ctx.moveTo(this.points[0].xPos, this.points[0].yPos);
  for (var p = 1; p < this.points.length; p++) {
    if (this.points[p].z > -(focal - 50)) {
      ctx.lineTo(this.points[p].xPos, this.points[p].yPos);


  this.dist = this.points[this.points.length - 1].z;


function Point(pos) {
  this.x = pos.x - canvas.width / 2 || 0;
  this.y = pos.y - canvas.height / 2 || 0;
  this.z = pos.z || 0;

  this.cX = 0;
  this.cY = 0;
  this.cZ = 0;

  this.xPos = 0;
  this.yPos = 0;

Point.prototype.rotateZ = function(angleZ) {
  var cosZ = Math.cos(angleZ),
    sinZ = Math.sin(angleZ),
    x1 = this.x * cosZ - this.y * sinZ,
    y1 = this.y * cosZ + this.x * sinZ;

  this.x = x1;
  this.y = y1;

Point.prototype.map2D = function() {
  var scaleX = focal / (focal + this.z + this.cZ),
    scaleY = focal / (focal + this.z + this.cZ);

  this.xPos = vpx + (this.cX + this.x) * scaleX;
  this.yPos = vpy + (this.cY + this.y) * scaleY;

// Init graphics stuff
var squares = [],
  focal = canvas.width / 2,
  vpx = canvas.width / 2,
  vpy = canvas.height / 2,
  barVals = [],
  sineVal = 0;

for (var i = 0; i < 15; i++) {
  squares.push(new Square(-300 + (i * 200)));

//ctx.lineWidth = 2;
ctx.strokeStyle = ctxBars.strokeStyle = ctxBars.fillStyle = '#00FF00';

/* fake console stuff */
var commandStart = ['Performing DNS Lookups for',
    'Searching ',
    'Analyzing ',
    'Estimating Approximate Location of ',
    'Compressing ',
    'Requesting Authorization From : ',
    'wget -a -t ',
    'tar -xzf ',
    'Entering Location ',
    'Compilation Started of ',
    'Downloading '
  commandParts = ['Data Structure',
    'TPS Reports',
    ' .... Searching ... ',
  commandResponses = ['Authorizing ',
    'Access Granted..',
    'Going Deeper....',
    'Compression Complete.',
    'Compilation of Data Structures Complete..',
    'Entering Security Console...',
    'Encryption Unsuccesful Attempting Retry...',
    'Waiting for response...',
    'Calculating Space Requirements '
  isProcessing = false,
  processTime = 0,
  lastProcess = 0;

function render() {
  ctx.clearRect(0, 0, canvas.width, canvas.height);

  squares.sort(function(a, b) {
    return b.dist - a.dist;
  for (var i = 0, len = squares.length; i < len; i++) {

  ctxBars.clearRect(0, 0, canvasBars.width, canvasBars.height);

  var y = canvasBars.height / 6;
  ctxBars.moveTo(0, y);

  for (i = 0; i < canvasBars.width; i++) {
    var ran = (Math.random() * 20) - 10;
    if (Math.random() > 0.98) {
      ran = (Math.random() * 50) - 25
    ctxBars.lineTo(i, y + ran);


  for (i = 0; i < canvasBars.width; i += 20) {
    if (!barVals[i]) {
      barVals[i] = {
        val: Math.random() * (canvasBars.height / 2),
        freq: 0.1,
        sineVal: Math.random() * 100

    barVals[i].sineVal += barVals[i].freq;
    barVals[i].val += Math.sin(barVals[i].sineVal * Math.PI / 2) * 5;
    ctxBars.fillRect(i + 5, canvasBars.height, 15, -barVals[i].val);


function consoleOutput() {
  var textEl = document.createElement('p');

  if (isProcessing) {
    textEl = document.createElement('span');
    textEl.textContent += Math.random() + " ";
    if ( > lastProcess + processTime) {
      isProcessing = false;
  } else {
    var commandType = ~~(Math.random() * 4);
    switch (commandType) {
      case 0:
        textEl.textContent = commandStart[~~(Math.random() * commandStart.length)] + commandParts[~~(Math.random() * commandParts.length)];
      case 3:
        isProcessing = true;
        processTime = ~~(Math.random() * 5000);
        lastProcess =;
        textEl.textContent = commandResponses[~~(Math.random() * commandResponses.length)];

  outputConsole.scrollTop = outputConsole.scrollHeight;

  if (outputConsole.scrollHeight > window.innerHeight) {
    var removeNodes = outputConsole.querySelectorAll('*');
    for (var n = 0; n < ~~(removeNodes.length / 3); n++) {

  setTimeout(consoleOutput, ~~(Math.random() * 200));


window.addEventListener('resize', function() {
  canvas.width = (window.innerWidth / 3) * 2;
  canvas.height = window.innerHeight / 3;

  canvasBars.width = window.innerWidth / 3;
  canvasBars.height = canvas.height; = (window.innerHeight / 3) * 2 + 'px'; = window.innerHeight / 3 + 'px';

  focal = canvas.width / 2;
  vpx = canvas.width / 2;
  vpy = canvas.height / 2;
  ctx.strokeStyle = ctxBars.strokeStyle = ctxBars.fillStyle = '#00FF00';
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400;
  src: local('Source Code Pro'), local('SourceCodePro-Regular'), url( format('woff');
body {
  font-family: 'Source Code Pro';
  background: #000;
  color: #00FF00;
  margin: 0;
  font-size: 13px;
canvas {
  position: absolute;
  top: 0;
  left: 0;
.bars-and-stuff {
  left: 66.6%;
.output-console {
  position: fixed;
  overflow: hidden;
p {
  margin: 0
<canvas class='hacker-3d-shiz'></canvas>
<canvas class='bars-and-stuff'></canvas>
<div class="output-console"></div>

The painting/maintenance guys realized that i'm a programmer and not just some guy listening to music!! I wonder if this would survive some examination by a tech guy :P – sabithpocker Jun 7 '14 at 6:34
I want it as my new screensaver!! In fact, how would you do that in ubuntu? – Lembik Jun 7 '14 at 19:36
I sat in the Toronto Public Library with this open and I noticed people behind me looking at my screen. This looks pretty 'scary' to a nontech guy. Can you can make allow us 2 change the title of the page to whatever we'd like, and if we can add in our own lines which will appear in the green text? I was thinking about making the title of the page 'Toronto Public Library Internet Access' and making the green lines say 'Accessing Toronto Public Library Security Database..' 'Accessing usernames and passwords...' 'Access Granted..' This may get me in some trouble but it will be fun. – user2719875 Jun 9 '14 at 20:39
Had this running for all of 30 seconds before my fellow developers came over to ask what I was hacking into. I think that counts as a success, so +1 – MrTheWalrus Jun 10 '14 at 20:43
"TPS Reports"...brilliant. – Dennis Jun 11 '14 at 0:11

Bash / coreutils

Introducing the first ever... compilation emulator. With this program, you can have epic office chair sword battles any time you like, without even writing any code!

    while read line;do
        if [ -d "$line" ];then
            (for i in "$line"/*;do echo $i;done)|sort -R|collect
            echo $line
        elif [[ "$line" == *".h" ]];then
            echo $line

sse="$(awk '/flags/{print;exit}' </proc/cpuinfo|grep -o 'sse\S*'|sed 's/^/-m/'|xargs)"


while true;do
    collect <<< /usr/include|cut -d/ -f4-|
        while read line;do
            if [ "$(dirname "$line")" != "$pd" ];then
                if [[ "$x" != "-"* ]];then
                    ssef="$(sed 's/\( *\S\S*\)\{'"$x,$x"'\}$//' <<< "$sse")"
                pd="$(dirname "$line")"
                if [[ "$((RANDOM%2))" == 0 ]];then
                case $((RANDOM%4)) in
                    0) arch=-m32;;
                    1) arch="";;
                    *) arch=-m64;;
                if [[ "$((RANDOM%3))" == 0 ]];then
                    gnu="-D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L "
                flags="gcc -w $(xargs -n1 <<< "opt pipe gnu ssef arch"|sort -R|(while read line;do eval echo \$$line;done))"
            if [ -d "/usr/include/$line" ];then
                echo $flags -shared $(for i in /usr/include/$line/*.h;do cut -d/ -f4- <<< "$i"|sed 's/h$/o/';done) -o "$line"".so"
                sleep $((RANDOM%2+1))
                line=$(sed 's/h$//' <<< "$line")
                echo $flags -c $line"c" -o $line"o"
                sleep 0.$((RANDOM%4))

It uses data from /usr/include to create a realistic-looking compilation log. I was too lazy to throw random warnings in, so there's just a -w flag.

Random sample:

gcc -w -m64 -pipe -msse -msse2 -msse3 -O1 -c libiptc/xtcshared.c -o libiptc/xtcshared.o
gcc -w -m64 -pipe -msse -msse2 -msse3 -O1 -c libiptc/libip6tc.c -o libiptc/libip6tc.o
gcc -w -m64 -pipe -msse -msse2 -msse3 -O1 -c libiptc/libxtc.c -o libiptc/libxtc.o
gcc -w -m64 -pipe -msse -msse2 -msse3 -O1 -c libiptc/ipt_kernel_headers.c -o libiptc/ipt_kernel_headers.o
gcc -w -m64 -pipe -msse -msse2 -msse3 -O1 -c libiptc/libiptc.c -o libiptc/libiptc.o
gcc -w -O2 -m64 -pipe -msse -msse2 -msse3 -msse4_1 -msse4_2 -shared libiptc/ipt_kernel_headers.o libiptc/libip6tc.o libiptc/libiptc.o libiptc/libxtc.o libiptc/xtcshared.o -o
gcc -w -m64 -pipe -O0 -msse -msse2 -msse3 -msse4_1 -c e2p/e2p.c -o e2p/e2p.o
gcc -w -msse -msse2 -msse3 -msse4_1 -m64 -pipe -O1 -shared e2p/e2p.o -o
gcc -w -pipe -O0 -msse -msse2 -m64 -c spice-client-gtk-2.0/spice-widget-enums.c -o spice-client-gtk-2.0/spice-widget-enums.o
gcc -w -pipe -O0 -msse -msse2 -m64 -c spice-client-gtk-2.0/spice-grabsequence.c -o spice-client-gtk-2.0/spice-grabsequence.o
gcc -w -pipe -O0 -msse -msse2 -m64 -c spice-client-gtk-2.0/spice-gtk-session.c -o spice-client-gtk-2.0/spice-gtk-session.o
gcc -w -pipe -O0 -msse -msse2 -m64 -c spice-client-gtk-2.0/spice-widget.c -o spice-client-gtk-2.0/spice-widget.o
gcc -w -pipe -O0 -msse -msse2 -m64 -c spice-client-gtk-2.0/usb-device-widget.c -o spice-client-gtk-2.0/usb-device-widget.o
gcc -w -pipe -m64 -msse -msse2 -O1 -shared spice-client-gtk-2.0/spice-grabsequence.o spice-client-gtk-2.0/spice-gtk-session.o spice-client-gtk-2.0/spice-widget-enums.o spice-client-gtk-2.0/spice-widget.o spice-client-gtk-2.0/usb-device-widget.o -o
gcc -w -pipe -m64 -msse -msse2 -O1 -c search.c -o search.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/path.c -o cairomm-1.0/cairomm/path.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/scaledfont.c -o cairomm-1.0/cairomm/scaledfont.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/fontface.c -o cairomm-1.0/cairomm/fontface.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/quartz_font.c -o cairomm-1.0/cairomm/quartz_font.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/win32_font.c -o cairomm-1.0/cairomm/win32_font.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/refptr.c -o cairomm-1.0/cairomm/refptr.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/cairomm.c -o cairomm-1.0/cairomm/cairomm.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/context.c -o cairomm-1.0/cairomm/context.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/enums.c -o cairomm-1.0/cairomm/enums.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/win32_surface.c -o cairomm-1.0/cairomm/win32_surface.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/pattern.c -o cairomm-1.0/cairomm/pattern.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/types.c -o cairomm-1.0/cairomm/types.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/matrix.c -o cairomm-1.0/cairomm/matrix.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/quartz_surface.c -o cairomm-1.0/cairomm/quartz_surface.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/exception.c -o cairomm-1.0/cairomm/exception.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/device.c -o cairomm-1.0/cairomm/device.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/surface.c -o cairomm-1.0/cairomm/surface.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/xlib_surface.c -o cairomm-1.0/cairomm/xlib_surface.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/fontoptions.c -o cairomm-1.0/cairomm/fontoptions.o
gcc -w -O0 -pipe -m64 -msse -msse2 -msse3 -msse4_1 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -c cairomm-1.0/cairomm/region.c -o cairomm-1.0/cairomm/region.o
gcc -w -O0 -pipe -m64 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -msse -msse2 -msse3 -msse4_1 -shared cairomm-1.0/cairomm/cairomm.o cairomm-1.0/cairomm/context.o cairomm-1.0/cairomm/device.o cairomm-1.0/cairomm/enums.o cairomm-1.0/cairomm/exception.o cairomm-1.0/cairomm/fontface.o cairomm-1.0/cairomm/fontoptions.o cairomm-1.0/cairomm/matrix.o cairomm-1.0/cairomm/path.o cairomm-1.0/cairomm/pattern.o cairomm-1.0/cairomm/quartz_font.o cairomm-1.0/cairomm/quartz_surface.o cairomm-1.0/cairomm/refptr.o cairomm-1.0/cairomm/region.o cairomm-1.0/cairomm/scaledfont.o cairomm-1.0/cairomm/surface.o cairomm-1.0/cairomm/types.o cairomm-1.0/cairomm/win32_font.o cairomm-1.0/cairomm/win32_surface.o cairomm-1.0/cairomm/xlib_surface.o -o cairomm-1.0/
gcc -w -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -m64 -msse -O1 -pipe -shared cairomm-1.0/*.o -o
gcc -w -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -m64 -msse -O1 -pipe -c ulockmgr.c -o ulockmgr.o
gcc -w -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -m64 -msse -O1 -pipe -c gshadow.c -o gshadow.o
gcc -w -O2 -msse -msse2 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -m64 -pipe -c dpkg/string.c -o dpkg/string.o
gcc -w -O2 -msse -msse2 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -m64 -pipe -c dpkg/fdio.c -o dpkg/fdio.o
gcc -w -O2 -msse -msse2 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -m64 -pipe -c dpkg/namevalue.c -o dpkg/namevalue.o
gcc -w -O2 -msse -msse2 -D_GNU_SOURCE=1 -D_REENTRANT -D_POSIX_C_SOURCE=200112L -m64 -pipe -c dpkg/macros.c -o dpkg/macros.o
Not bad at all! Something doesn't feel quite right about this (is it that the HD keeps completely quiet?) but to the unknowing viewer it's very unlikely to raise suspicions. Although... what, it's compiling libdrm? And sys/wait.o?? What the... – ceased to turn counterclockwis Jun 8 '14 at 21:37
@leftaroundabout Say that you have an SSD. – mniip Jun 8 '14 at 22:11
To make it more authentic you should output fake compiler warnings several times per gcc line. :) – monocell Jun 10 '14 at 9:07
You could probably use pkg-config to come up with more realistic fake gcc flags. – Brendan Long Jun 10 '14 at 19:10
@WChargin that would not activate the HD. – Thorbjørn Ravn Andersen Jun 12 '14 at 13:41


Infinitely displays random hexadecimal values, with some of them highlighted to make it feel like you are performing a complicated search in raw data.

while true; do head -c200 /dev/urandom | od -An -w50 -x | grep -E --color "([[:alpha:]][[:digit:]]){2}"; sleep 0.5; done

enter image description here

Oooh, I like this one! – SomeKittens Jun 9 '14 at 21:41
(Bear with me, new to bash) but when running this line, (mac osx, terminal) I get this output on a loop: od: illegal option -- w usage: od [-aBbcDdeFfHhIiLlOosvXx] [-A base] [-j skip] [-N length] [-t type] [[+]offset[.][Bb]] [file ...] – Sterling Archer Jun 9 '14 at 21:55
It seems that your version of od does not support the -w option. You can drop this option, it's here just to show more columns of data, to fill the screen a bit more. – barjak Jun 9 '14 at 23:45
Personally, I prefer this with sleep 0.5 changed to sleep.$[$RANDOM % 10]. It makes it a bit jerkier, and more like a real search. I do like it, though! – undergroundmonorail Jun 10 '14 at 17:38
Reminds me of the never ending search for "ca fe": cat /dev/random | hexdump | grep "ca fe" – daviewales Jun 11 '14 at 8:00

A very long build:

emerge openoffice
;_;​​​​​​​​​​​​ – mniip Jun 7 '14 at 8:26
Longer than Chromium? – nyuszika7h Jun 7 '14 at 9:05
The problem with compiling a real project it that it will stop if an error occurs. Probably we should put this in an infinite loop. – Akira Yamamoto Jun 11 '14 at 15:03
Do we have emerge in Linux Mint? – Akira Yamamoto Jun 11 '14 at 15:04
On .deb systems like Ubuntu and Mint, you want sudo apt-get build-dep libreoffice; apt-get source libreoffice; cd libreoffice*; while :; do nice dpkg-buildpackage -rfakeroot; done (You will have to babysit it on its first run, at least until the real compilation starts. Subsequent runs only need the while loop.) – Adam Katz Aug 15 '15 at 7:39


This one will:

  1. Get a random code from this site. code review (for more readable, well written code)
  2. Make it look like you are typing this code.
require 'open-uri'
require 'nokogiri'
site = ""
system 'cls'
system("color 0a")
5.times do
        id = rand(1..6000)
        url = "#{site}/a/#{id}"
        page = Nokogiri::HTML(open(url))
        code = page.css('code')[0].text
    end until code

    code.each_char  do |char|
        print char
        sleep rand(10) / 30.0

Here is this script based on a code taken from here:

require 'open-uri'
code = open("")
system 'cls'
system("color 0a")

code.each_char  do |char|
    print char
    sleep rand(10) / 30.0

Here is how it looks: Code

What if the code that it gets is in Brainf**k , Golfscript or J. That will raise some suspicion. – user80551 Jun 9 '14 at 19:28
Finally my carefully placed answers that add backdoors all around pay out – PlasmaHH Jun 10 '14 at 10:04
Maybe stackoverflow would be better? – PyRulez Jun 11 '14 at 15:41
The typing speed of each one looks more realistic if I randomize the speed (and make it faster) by changing the sleep line to sleep rand(10).to_f / 30. – Rory O'Kane Jun 12 '14 at 6:24
I think using Code Review code on Code Golf is perfect. I've always thought of Code Golf as the evil twin of Code Review, and I love both... – trichoplax Jul 25 '14 at 11:52

Lets go with a simple bash script that makes you look hackerish by printing the contents of every file identified as text in /var/log/ line by line, with random delays to make it look like intensive things are happening. Depending on the files it hits, it can give some rather interesting output.

# this script helps you do hackerish stuff

if [ "$EUID" -ne 0 ]
  echo "Please run as root to be hackerish."

# turn off globbing
set -f
# split on newlines only for for loops
for log in $(find /var/log -type f); do
  # only use the log if it's a text file; we _will_ encounter some archived logs
  if [ `file $log | grep -e text | wc -l` -ne 0 ]
    echo $log
    for line in $(cat $log); do
      echo $line
      # sleep for a random duration between 0 and 1/4 seconds to indicate hard hackerish work
      bc -l <<< $(bc <<< "$RANDOM % 10")" / 40" | xargs sleep

Be sure your terminal theme looks hackerish. Here are some badass examples (no idea what any of this means, but it looks hackerish):

image image

Nicely done. Example screenshot is great – SomeKittens Jun 9 '14 at 23:52
Are you aware that your private keys are on these screenshots? – Hubert OG Jun 14 '14 at 18:33
Haha, gotcha! ;-) – Hubert OG Jun 14 '14 at 22:00
(But seriously, I didn't read those screenshots so I don't know what's actually there.) – Hubert OG Jun 14 '14 at 22:00
@HubertOG Wow, you almost gave me a heart attack... ;P I didn't see that anywhere so I thought i was going insane :O – Jwosty Jun 14 '14 at 22:09

Bash : The endless git commit

A problem with computers today is that they are quite fast, so even compilation tasks eventually finish. Also, given a script that runs for a long time you might argue that it's actually possible to continue to work on something else while the script runs.

To solve this we have the following program. Just learn to type 'y' or 'n' randomly every now and then.

Of course you need a git repo with some new content but assuming you occasionally do actual work that should not be a problem.


while [ 1 ]; do
  git add -p
  git reset
I feel most severely disturbed by this CG entry... It's either +1 or -1, but I still don't know which one! – vaxquis Jun 8 '14 at 16:43


function lazy {
    sudo apt-get update

This will just keep updating your repos. If some one notices, just say that you added a new repo for a new program, and you are testing different ones. It isn't really like faking a script, but a command.

NOTE: I do not condone being unproductive at work, but I do like experiments. Therefore I recommend this app to be used to be secretly productive.

Good, but watch out for that recursive function. – Digital Trauma Jun 7 '14 at 4:34
looks like fork bomb!! – Avinash R Jun 8 '14 at 20:14
@AvinashR Not quite, no fork. – PyRulez Jun 8 '14 at 21:13
Mirror hosts hate you now. – Caleb Jun 12 '14 at 5:38
"Not quite, no fork." So you say, only bomb? :-) – celtschk Jun 15 '14 at 14:25

C++ Neural Network


Sadly I optimized this code:( made it 2000x faster... The legacy code is still perfect for wasting time though!


I actually started a project in convolutional neural networks perfect for this! The source code and documentation is on github. The first step is to create a new network.

std::vector<int> numNeurons = { 500, 500, 2000, 10 };
std::vector<int> numMaps = { 1, 1, 1, 1 };

ConvolutionalNeuralNetwork neuralNetwork(numNeurons, numMaps, numNeurons, 
    std::vector<std::vector<int>>(), std::vector<std::vector<int>>());

Now that we have a network with 300 neurons and 1,250,000 synapses, lets save it to a file to make sure we don't lose any progress we make with the network.


That generated a 68MB text file and more than a few hours of relaxed work. Now, let's have some fun doing things with it! I'll create a random input and start to discriminate it.

std::vector<std::vector<float>> input;
for (int i = 0; i < 2; ++i)

for (int i = 0; i < 2; ++i)
    for (int j = 0; j < 3; ++j)
        input[i].push_back(rand() % 100);

That was a pretty small input for an image, but we're only proving the network can do something. Next step is to discriminate with it!

Layer output = neuralNetwork.Discriminate();

This hasn't even finished yet for me, and it's been running for over 2 days! Then once we get that output, let's run it through again in reverse just for fun.

Layer generatedOutput = neuralNetwork.Generate(output);

This is all just to prove that the API works, no plans for it yet. This step hasn't been run for me yet, and I've been waiting a while. Good 2+ days burned, and that is a rough estimate off my current testing. This is pretty complicated, and you'll work hard for a day or two making it, but after that you may never have to work again!

Note: If you never, ever wanna work again, try to train the network


I don't even have the time to waste for this one!

If you want to show off all the data that's happening, add some calls in the functions just to display what's happening

New constructor

ConvolutionalNeuralNetwork::ConvolutionalNeuralNetwork(std::vector<int> neuronCountPerLayer, std::vector<int> featureMapsPerLayer, std::vector<int> featureMapDimensions, std::vector<std::vector<int>> featureMapConnections, std::vector<std::vector<int>> featureMapStartIndex)
std::map<SimpleNeuron, std::vector<Synapse>> childrenOf;
for (unsigned int i = 0; i < neuronCountPerLayer.size() - 1; ++i)
    Layer currentLayer;

    for (int j = 0; j < neuronCountPerLayer[i]; ++j)
        std::vector<Synapse> parentOf;

        if (featureMapsPerLayer[i] == 1)
            for (int n = 0; n < neuronCountPerLayer[i + 1]; ++n)
                std::cout << "Adding new synapse, data: " << std::endl;

                SimpleNeuron current = SimpleNeuron(i + 1, j + 1);
                SimpleNeuron destination = SimpleNeuron(i + 2, n + 1);

                std::cout << "Origin: " << i + 1 << ", " << j + 1 << "; Destination: " << i + 2 << ", " << n + 1 << std::endl;

                Synapse currentParentSynapse = Synapse(current, current);
                Synapse currentChildSynapse = Synapse(destination, destination);


                std::cout << "Weights: Discriminative: " << currentChildSynapse.GetWeightDiscriminate() << "; Generative: " << currentChildSynapse.GetWeightGenerative() << std::endl;


                if (childrenOf.find(destination) != childrenOf.end())
                    childrenOf.insert(std::pair<SimpleNeuron, std::vector<Synapse>>(destination,
                    std::vector<Synapse>{ currentChildSynapse }));

            int featureMapsUp = featureMapsPerLayer[i + 1];
            int inFeatureMap = featureMapsPerLayer[i] / j;
            int connections = featureMapConnections[i][inFeatureMap];
            int startIndex = (neuronCountPerLayer[i + 1] / featureMapsUp) * featureMapStartIndex[i][inFeatureMap];
            int destinationIndex = startIndex + (neuronCountPerLayer[i + 1] / featureMapsUp) * connections;

            for (int n = startIndex; n < destinationIndex; ++n)
                SimpleNeuron current = SimpleNeuron(i + 1, j + 1);
                SimpleNeuron destination = SimpleNeuron(i + 2, n + 1);

                std::cout << "Origin: " << i + 1 << ", " << j + 1 << "; Destination: " << i + 2 << ", " << n + 1 << std::endl;

                Synapse currentParentSynapse = Synapse(current, current);
                Synapse currentChildSynapse = Synapse(destination, destination);


                std::cout << "Weights: Discriminative: " << currentChildSynapse.GetWeightDiscriminate() << "; Generative: " << currentChildSynapse.GetWeightGenerative() << std::endl;


                if (childrenOf.find(destination) != childrenOf.end())
                    childrenOf.insert(std::pair<SimpleNeuron, std::vector<Synapse>>(destination,
                    std::vector<Synapse>{ currentChildSynapse }));

        std::cout << "Adding neuron" << std::endl << std::endl;

        if (childrenOf.find(SimpleNeuron(i + 1, j + 1)) != childrenOf.end())
            currentLayer.AddNeuron(Neuron(parentOf, + 1, j + 1))));
            currentLayer.AddNeuron(Neuron(parentOf, std::vector<Synapse>{}));

    std::cout << "Adding layer" << std::endl << std::endl << std::endl;


Layer output;

std::cout << "Adding final layer" << std::endl;

for (int i = 0; i < neuronCountPerLayer[neuronCountPerLayer.size() - 1]; ++i)
    output.AddNeuron(Neuron(std::vector<Synapse>(),, i + 1))));

New FireSynapse

float Neuron::FireSynapse()
float sum = 0.0f;

std::cout << "Firing Synapse!" << std::endl;

for (std::vector<Synapse>::iterator it = m_ChildOfSynapses.begin(); it != m_ChildOfSynapses.end(); ++it)
    sum += ((*it).GetWeightDiscriminate() * (*it).GetParent().GetValue());

std::cout << "Total sum: " << sum << std::endl;

float probability = (1 / (1 + pow(e, -sum)));

std::cout << "Probably of firing: " << probability << std::endl;

if (probability > 0.9f)
    return 1.0f;

else if (probability < 0.1f)
    return 0.0f;

    std::cout << "Using stochastic processing to determine firing" << std::endl;
    float random = ((rand() % 100) / 100);
    if (random <= probability)
        return 1.0f;
        return 0.0f;

You will get plenty of output on your console now.

+1 for the real life context as well. Interesting :) – George Jun 11 '14 at 20:08
Hahahaha the initials spell "CNN" – QPaysTaxes Apr 12 at 18:48

Python 3


import random
import time

first_level_dirs = ['main', 'home', 'usr', 'root', 'html', 'assets', 'files']
title_descs = ['page', 'script', 'interface', 'popup']
id_names = ['container', 'main', 'textbox', 'popup']
tag_names = ['div', 'textarea', 'span', 'strong', 'article', 'summary', 'blockquote', 'b']
autoclosing_tags = ['br', 'input']

def random_js_line():
    return random.choice([
        '      $("#%s").html("<b>" + $("#%s").text() + "</b>");' % (random.choice(id_names), random.choice(id_names)),
        '      $.get("t_%i.txt", function(resp) {\n        callback(resp);\n      });' % (int(random.random() * 50)),
        '      $("%s>%s").css({width: %i + "px", height: %i + "px"});' % (random.choice(tag_names), random.choice(tag_names), int(random.random() * 75), int(random.random() * 75)),
        '      for (var i = 0; i < count; i++) {\n        $("<div>").appendTo("#%s");\n      }' % (random.choice(id_names))

def random_js_lines():
    lines = [random_js_line() for _ in range(int(random.random() * 14) + 1)]
    return '\n'.join(lines)

def random_html_line():
    tag_name = random.choice(tag_names)
    return random.choice([
        '    <%s>id: %i</%s>' % (tag_name, int(random.random() * 1000), tag_name),
        '    <%s class="%s">\n      <%s/>\n    </%s>' % (tag_name, random.choice(first_level_dirs), random.choice(autoclosing_tags), tag_name),
        '    <div id="%s"></div>' % (random.choice(first_level_dirs))

def random_html_lines():
    lines = [random_html_line() for _ in range(int(random.random() * 9) + 1)]
    return '\n'.join(lines)

while True:
    print('creating /%s/%i.html' % (random.choice(first_level_dirs), int(random.random() * 1000)))
    lines = [
        '<!DOCTYPE html>',
        '<html lang="en">',
        '  <head>',
        '    <title>%s #%i</title>' % (random.choice(title_descs), int(random.random() * 100)),
        '    <script type="text/javascript" src="/js/assets/jquery.min.js"></script>',
        '    <script type="text/javascript">',
        '    </script>',
        '  </head>',
        '  <body>',
        '  </body>',
    lines = [single_line for linegroup in lines for single_line in linegroup.split('\n')]
    for line in lines:
        time.sleep(random.random() / 10)
    time.sleep(random.random() / 2)

It outputs a bunch of lines of fake JS and HTML, with fake "loading" times (delays) to make it seem more realistic.

This can and will be expanded upon greatly! (the basic program is there; I just have to add more content now)

Here's a sample "page" it generates (this is actually from an old version of the code; I'll update it with the new code when I'm finished):

creating /assets/809.html
<!DOCTYPE html>
<html lang="en">
    <title>script #32</title>
    <script type="text/javascript" src="/js/assets/jquery.min.js"></script>
    <script type="text/javascript">
      $("#main").html("<b>" + $("#main").text() + "</b>");
      $("#textbox").html("<b>" + $("#container").text() + "</b>");
      $("#popup").html("<b>" + $("#textbox").text() + "</b>");
      $("#container").html("<b>" + $("#textbox").text() + "</b>");
      $.get("t_11.txt", function(resp) {
      $("#main").html("<b>" + $("#textbox").text() + "</b>");
      $.get("t_14.txt", function(resp) {
      $.get("t_1.txt", function(resp) {
      $.get("t_34.txt", function(resp) {
    <span>id: 462</span>
    <textarea>id: 117</textarea>
Awesome, can't wait to see what you add to it! – SomeKittens Jun 7 '14 at 6:11
heh yeah this one is pretty kick ass. My mind runs wild with cool things you could do with the generations – Loktar Jun 7 '14 at 6:36
Not just python3, 2.7 is ok too – Hannes Karppila Jun 7 '14 at 9:16
Great job. Looks pretty realistic. – qwr Jun 8 '14 at 19:08

Node.js + BDD

Looks like an endless stream of BDD-style tests running. Nobody can blame you for running tests!

    "use strict"
var colors = require("colors"),
    features = ["User", "Request", "Response", "Cache", "Preference", "Token", "Profile", "Application", "Security"],
    patterns = ["Factory", "Observer", "Manager", "Repository", "Impl", "Dao", "Service", "Delegate", "Activity"],
    requirements = ["return HTTP 403 to unauthorized users",
                    "accept UTF-8 input",
                    "return HTTP 400 for invalid input",
                    "correctly escape SQL",
                    "validate redirects",
                    "provide online documentation",
                    "select internationalized strings, based on locale",
                    "support localized date formats",
                    "work in IE6",
                    "pass W3C validation",
                    "produce valid JSON",
                    "work with screen readers",
                    "use HTML5 canvas where available",
    minTimeout = 100,
    maxTimeout = 1000,
    minRequirements = 2,
    maxRequirements = 6,
    skipThreshold = 0.1,
    failThreshold = 0.2

function randBetween(l, u) {
  return Math.floor(Math.random() * (u - l) + l) 

function choose(l) {
  return l[randBetween(0, l.length)]

function timeout() {
  return randBetween(minTimeout, maxTimeout)

function printFeature() {
  var feature = choose(features) + choose(patterns)
  var article = /^[AEIOU]/.test(feature) ? "An " : "A "
  console.log(article + feature + " should")
  setTimeout(function() {
    var reqs = randBetween(minRequirements, maxRequirements)
  }, timeout())

function printRequirements(i) {
  if (i > 0) {
    var skipFailOrPass = Math.random()
    if (skipFailOrPass < skipThreshold) {
      console.log(("- " + choose(requirements) + " (SKIPPED)").cyan)
    } else if (skipFailOrPass < failThreshold) {
      console.log(("x " + choose(requirements) + " (FAILED)").red)
      console.log(("  - Given I am on the " + choose(features) + " page").green)
      console.log(("  - When I click on the " + choose(features) + " link").green)
      console.log(("  x Then the Log Out link should be visible in the top right hand corner").red)
    } else {
      console.log(("+ " + choose(requirements)).green)
    setTimeout(function() {printRequirements(i - 1)}, timeout())
  } else {



It occurred to me that it would look suspicious if all your tests passed, so I've updated it to include some failing tests - complete with Given-When-Thens.

And yes, I know that all the failures have the same message. You really need to fix that logout link!

enter image description here

Very clever, I get bonus points for ensuring that my code is tested! Cant be too careful – SomeKittens Jun 10 '14 at 16:53

C# (Windows)

I present to you, the brand new Memtest86 Simulator 2014! (Because running Memtest86 under Windows makes total sense)

Complete with working progress bars and pattern indicator!

This code extensively uses the Console class, which as far as I know, it's only available on Windows. Also, I couldn't find a way to show the real processor name/frequency and available memory, so those are hardcoded.

Screenshot: enter image description here


To retrieve the processor information, you can use the Microsoft.Win32 namespace and RegistryKey class.

 // Processor information, add 'using Microsoft.Win32';
string processor = "";
RegistryKey processor_name = Registry.LocalMachine.OpenSubKey(@"Hardware\Description\System\CentralProcessor\0", RegistryKeyPermissionCheck.ReadSubTree);
        if (processor_name != null)
            if (processor_name.GetValue("ProcessorNameString") != null)
                processor = (string)processor_name.GetValue("ProcessorNameString");

Code (ugly, I know):

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;

class MemTestSim
    static void Main(string[] args)
        Random r = new Random();
        int seconds = 0;
        int pass = 0;
        int test = 0;
        int testNumber = 0;

        string[] testNames = { "Address test, own Adress", "Moving inversions, ones & zeros", "Moving inversions, 8 bit pattern" };
        string[] pattern = { "80808080", "7f7f7f7f", "40404040", "bfbfbfbf", "20202020", "dfdfdfdf", "10101010", "efefefef", "08080808", "f7f7f7f7", "8f8f8f8f" };

        // Trick to stop the console from scrolling
        Console.SetWindowSize(80, 40);

        Console.Title = "Memtest86+ v2.11";
        Console.CursorVisible = false;

        // Dark Blue Background Color
        Console.BackgroundColor = ConsoleColor.DarkBlue;

        // Green Title Text
        Console.BackgroundColor = ConsoleColor.DarkGreen;
        Console.ForegroundColor = ConsoleColor.Black;
        Console.Write("      Memtest86+ v2.11     ");

        // Gray on Blue Text and main window structure
        Console.BackgroundColor = ConsoleColor.DarkBlue;
        Console.ForegroundColor = ConsoleColor.Gray;
        Console.Write("| Pass " + pass + "%\n");
        Console.WriteLine("Intel Core i5 2290 MHz     | Test ");
        Console.WriteLine("L1 Cache:  128K   1058MB/s | Test #" + testNumber + "  [" + testNames[0] + "]");
        Console.WriteLine("L2 Cache:  512K   1112MB/s | Testing:  132K - 8192M  8192M");
        Console.WriteLine("L3 Cache: 3072K   1034MB/s | Pattern: ");
        Console.WriteLine("Memory  : 8192M            |---------------------------------------------------");
        Console.WriteLine("Chipset :  Intel i440FX");
        Console.WriteLine(" WallTime   Cached  RsvdMem   MemMap   Cache  ECC  Test  Pass  Errors  ECC Errs");
        Console.WriteLine(" ---------  ------  -------  --------  -----  ---  ----  ----  ------  --------");
        Console.WriteLine("   0:00:26   8192M      64K  e820-Std    on   off   Std     0       0");

        // Bottom Bar
        Console.SetCursorPosition(0, 24);
        Console.BackgroundColor = ConsoleColor.Gray;
        Console.ForegroundColor = ConsoleColor.DarkBlue;
        Console.WriteLine("(ESC)Reboot  (c)configuration  (SP)scroll_lock  (CR)scroll_unlock               ");

        Console.SetWindowSize(80, 25);

        // Reset text color
        Console.BackgroundColor = ConsoleColor.DarkBlue;
        Console.ForegroundColor = ConsoleColor.Gray;

        // FOREVER
        while (true)
            TimeSpan time = TimeSpan.FromSeconds(seconds);

            // Running Time (WallTime)
            Console.SetCursorPosition(3, 11);
            string min = (time.Minutes < 10 ? "0" + time.Minutes : "" + time.Minutes);
            string sec = (time.Seconds < 10 ? "0" + time.Seconds : "" + time.Seconds);
            Console.Write(time.Hours + ":" + min + ":" + sec);

            // Test percentage
            Console.SetCursorPosition(34, 1);
            Console.Write((int)test + "%");

            // Test Progress Bar
            Console.SetCursorPosition(38, 1);
            for (int i = 0; i < test / 3; i++)

            Console.SetCursorPosition(38, 0);
            for (int i = 0; i < pass / 3; i++)

            // Test Number
            Console.SetCursorPosition(35, 2);
            Console.Write(testNumber + "  [" + testNames[testNumber] + "]        ");

            if (testNumber != 0)
                Console.SetCursorPosition(38, 4);
                Console.Write(pattern[test / 10]);
                Console.SetCursorPosition(38, 4);
                Console.Write("         ");

            if (test >= 100)
                test = 0;

                Console.SetCursorPosition(34, 0);
                Console.Write(pass + "%");

                Console.SetCursorPosition(34, 1);
                Console.Write("                                      ");
                pass += 2;

                if (testNumber == 2)
                    testNumber = 0;

            test += r.Next(0, 3);
Why not just run Memtest86? "I think I have some hardware problems here, I guess I'll just have to goof off until it's done" – MadTux Jun 10 '14 at 16:00
@MadTux 'Cos you've gotta boot into Memtest, which means no cat pictures. – Schilcote Jun 10 '14 at 21:45
System.Console Works on Mono, I think you just have to tune the code for arbitrary console window size – NothingsImpossible Jun 10 '14 at 23:33
Couldn't you run Memtest86 in a VM? – Cole Johnson Jun 12 '14 at 0:21
I LOVE the Memtest in a VM idea. – John Jun 13 '14 at 23:25

Python, 36 characters

print("Opening Internet Explorer...")

Python, 21 characters

print("Opening IE...")

Trying to be funny. :P

You mean like… ? – aditsu Jun 12 '14 at 21:37
^Exactly. :DDDD – Mohammad Areeb Siddiqui Jun 12 '14 at 22:10


You pretend to type while the script generates a bunch of accessors and mutators in JavaScript. Make sure an IDE (I tested this on Notepad++) is the active window.

Specify the list of variables and class name if you want. I just used what was already in window.location.

Press esc to exit.

Press 0 on your numberpad to pause when someone tries to talk to you.

Press ctrl+w (w stands for work) to start

        variable_names  :=  "hash|host|hostname|href|origin|pathname|port|protocol|search"
        class_name  :=  "location"

        StringSplit, variable_names_array, variable_names, "|"

        loop, %variable_names_array0%{
            Random, delay, 80, 120
            SetKeyDelay, %delay%
            current :=  variable_names_array%a_index%
            Send, %class_name%.prototype.
            Random, r, 800, 1300
            Sleep, %r%
            Send, get_
            Random, r, 800, 1300
            Sleep, %r%
            Send, %current%
            Random, r, 800, 1300
            Sleep, %r%
            Send, {space}={space}
            Random, r, 800, 1300
            Sleep, %r%
            Send, function(){{}{enter}
            Random, r, 800, 1300
            Sleep, %r%
            Send, {tab}
            Random, r, 800, 1300
            Sleep, %r%
            Send, return this.
            Random, r, 800, 1300
            Sleep, %r%
            Send, %current%;{enter}
            Random, r, 800, 1300
            Sleep, %r%
            Send, {BackSpace}{}}
            Random, r, 800, 1300
            Sleep, %r%
            Send, {enter}{enter}
            Random, r, 800, 1300
            Sleep, %r%

            Send, %class_name%.prototype.
            Random, r, 800, 1300
            Sleep, %r%
            Send, set_
            Random, r, 800, 1300
            Sleep, %r%
            Send, %current%
            Random, r, 800, 1300
            Sleep, %r%
            Send, {space}={space}
            Random, r, 800, 1300
            Sleep, %r%
            Send, function(%current%){{}{enter}
            Random, r, 800, 1300
            Sleep, %r%
            Send, {tab}
            Random, r, 800, 1300
            Sleep, %r%
            Send, this.
            Random, r, 800, 1300
            Sleep, %r%
            Send, %current% ={space}
            Random, r, 800, 1300
            Sleep, %r%
            Send, %current%;{enter}
            Random, r, 800, 1300
            Sleep, %r%
            Send, return this;{enter}
            Random, r, 800, 1300
            Sleep, %r%
            Send, {BackSpace}{}}
            Random, r, 800, 1300
            Sleep, %r%
            Send, {enter}{enter}
            Random, r, 800, 1300
            Sleep, %r%


    Pause, toggle


Dumps a random block of physical memory and looks at the contents. Going to need to be root for this. Only the first 1MB of memory is available by default. dd default block size is 512 bytes, that can be changed with option ibs=bytes but keep in mind the other option skip=$offset which picks a block at random. Output from dd is sent through tr to remove non ASCII characters; only unique results 2 characters or longer are evaluated.

Each string found is compared to a dictionary. If no matches are found, it attempts to decode as base64. Finally, all the strings evaluated are returned.

There are several other platform dependent options to be aware of, such as location of dictionary file (/usr/share/dict/words), whether sleep accepts floating point inputs, and if base64 is available.

Also, be aware that dd outputs stats on the operation performed to stderr, which is piped to /dev/null. If something were to go horribly wrong (you are accessing /dev/mem ...) the stderr output won't be visible.

Overall, not very useful, but I learned a bit about linux memory and writing this script turned out to be fun.


offset=`expr $RANDOM % 512`
mem=`dd if=/dev/mem skip=$offset count=1 2>/dev/null| tr '[\000-\040]' '\n' | tr '[\177-\377'] '\n' | sort -u | grep '.\{2,\}'`


for line in $mem
    echo "Evaluating $line"
    greps=`grep "^$line" /usr/share/dict/words | head`

    if [ -n "$greps" ]
        echo "Found matches."
        echo $greps
        #echo "No matches in dictionary. Attempting to decode."
        decode=`echo "$line" | base64 -d 2>/dev/null`
        if [ $? -ne 1 ]
            echo "Decode is good: $decode"
            #echo "Not a valid base64 encoded string."

    results+=" $line"

    # make it look like this takes a while to process
    sleep 0.5


if (( ${#results} > 1 ))
    echo "Done processing input at block $offset: $results"

Sometimes there's no interesting output (all zeroes). Sometimes there are only a few strings:

codegolf/work# ./s 
Evaluating @~
Evaluating 0~
Evaluating ne
Found matches.
ne nea neal neallotype neanic neanthropic neap neaped nearable nearabout
Done processing input at block 319:  @~ 0~ ne

Sometimes there is actually something human readable in memory (before I was logging block offset):

codegolf/work# ./s 
Evaluating grub_memset
Evaluating grub_millisleep
Evaluating grub_mm_base
Evaluating grub_modbase
Evaluating grub_named_list_find
Evaluating grub_net_open
Evaluating grub_net_poll_cards_idle
Evaluating grub_parser_cmdline_state
Evaluating grub_parser_split_cmdline
Evaluating grub_partition_get_name
Evaluating grub_partition_iterate
Evaluating grub_partition_map_list
Evaluating grub_partition_probe
Evaluating grub_pc_net_config
Evaluating grub_pit_wait
Evaluating grub_print_error
Evaluating grub_printf
Evaluating grub_printf_
Evaluating grub_puts_
Evaluating grub_pxe_call
Evaluating grub_real_dprintf
Evaluating grub_realidt
Evaluating grub_realloc
Evaluating grub_refresh
Evaluating grub_register_command_prio
Evaluating grub_register_variable_hook
Evaluating grub_snprintf
Evaluating grub_st
Evaluating grub_strchr
Evaluating _memmove
Done processing input:  grub_memset grub_millisleep grub_mm_base 
    grub_modbase grub_named_list_find grub_net_open grub_net_poll_cards_idle
    grub_parser_cmdline_state grub_parser_split_cmdline 
    grub_partition_get_name grub_partition_iterate grub_partition_map_list 
    grub_partition_probe grub_pc_net_config grub_pit_wait grub_print_error 
    grub_printf grub_printf_ grub_puts_ grub_pxe_call grub_real_dprintf 
    grub_realidt grub_realloc grub_refresh grub_register_command_prio 
    grub_register_variable_hook grub_snprintf grub_st grub_strchr _memmove

And one last sample run showing malformed grep input, dictionary hits, and a successful base64 decode (before logging block offset again):

codegolf/work# ./s 
Evaluating <!
Evaluating !(
Evaluating @)
Evaluating @@
Evaluating $;
Evaluating '0@
Evaluating `1
Evaluating 1P$#4
Evaluating )$2
Evaluating -3
Evaluating 3HA
Evaluating 3N
Evaluating @@9
Evaluating 9@
Evaluating 9Jh
Evaluating \9UK
grep: Invalid back reference
Evaluating a#
Evaluating CX
Evaluating ?F
Evaluating !H(
Evaluating +%I
Evaluating Io
Found matches.
Io Iodamoeba Ione Ioni Ionian Ionic Ionicism Ionicization Ionicize Ionidium
Evaluating Kj
Found matches.
Evaluating l#
Evaluating L6qh
Decode is good: /��
Evaluating O%
Evaluating OX
Evaluating PR
Evaluating .Q
Evaluating Q4!
Evaluating qQ
Evaluating )u
Evaluating Ua
Found matches.
Uaraycu Uarekena Uaupe
Evaluating $v
Evaluating )V
Evaluating V8
Evaluating V,B~
Evaluating wIH
Evaluating xU
Evaluating y@
Evaluating @z
Evaluating Z0
Evaluating zI
Evaluating Z@!QK
Done processing input:  <! !( @) @@ $; '0@ `1 1P$#4 )$2 -3 3HA 3N
    @@9 9@ 9Jh \9UK a# CX ?F !H( +%I Io Kj l# L6qh O% OX PR .Q Q4!
    qQ )u Ua $v )V V8 V,B~ wIH xU y@ @z Z0 zI Z@!QK
How do you run this? I dumped it into, did a chmod +x on it, but it just exits. sudo doesn't help, either. – Kenzie Togami Jun 8 '14 at 16:03
Sounds like the mem= line isn't returning anything. You'll have to check and make sure that each part of the command between pipes is actually returning something. – tolos Jun 8 '14 at 17:14
Okay, I'll do that. – Kenzie Togami Jun 9 '14 at 1:49
This only ran for like 5 seconds the first time and printed like 12 lines, then like 0.1 seconds every subsequent time with no output. – Mike Aug 13 '15 at 23:54

Windows Batch

@echo off

set /p hax="How much haxx0rz: " %=%
set /p haxx="How quick haxx0rz (seconds): " %=%

FOR /L %%I IN (1, 1, %hax%) DO (
START cmd /k "COLOR A&&tree C:\"
timeout %haxx%

This is a joke script that I've kept with me for years to make it look like something out of a 90's hacker movie. I usually use it while remotely connected to a computer to freak people out.

He's downloading a virus onto the whole system! – qwr Jun 14 '14 at 1:16


The never ending search for cafes.

I found this on the web a long time ago:

cat /dev/urandom | hexdump | grep "ca fe"
Try using urandom instead. – Kristoffer Ryhl Jun 11 '14 at 9:48
Ah... I tested it on a Mac, and Macs have both random and urandom. – daviewales Jun 11 '14 at 13:52
/dev/random exists, but it's intended to be more secure than /dev/urandom by only generating numbers if there's available entropy. Once you run out, it stops. /dev/urandom doesn't do that, and won't ever just stop outputting. – undergroundmonorail Jun 12 '14 at 4:20
Why is it never ending? I feel stupid, the second time today. – DanFromGermany Jun 17 '14 at 13:57
/dev/urandom is a 'file' which continuously feeds random numbers to cat. cat then pipes these to hexdump, etc. – daviewales Jun 17 '14 at 16:57

Python 2.7

The Endless Test Suite

"Runs" a set of "Unit Tests" on all the files in your directory tree. Traverses all subdirectories. Starts over when it gets to the end.

Prints a running status:

============================= entering . =============================
------------------------ ------------------------
Ran 18 tests in 3.23707662572 seconds, 0 errors
---------------------------- test_main.c ----------------------------
Ran 26 tests in 1.3365194929 seconds, 0 errors
--------------------------- test_parser.c ---------------------------
Ran 8 tests in 1.61633904378 seconds, 0 errors
--------------------------- test_README.c ---------------------------
Ran 12 tests in 2.27466813182 seconds, 0 errors
4 modules OK (0 failed)
=========================== entering ./lib ===========================


Features that make it more complex than needed, and hopefully more realistic:

  • The number of tests and test time is proportional to the file size.
  • Turns non source code file extensions into known ones. Modify CodeExtensions to add more known types.
    • Selects new extension based on frequency of actual language files seen, so you won't be seen testing Python code if your hard drive is full of Ruby.
  • Skips files with leading . No giveaways like "test_.bashrc.js"
import os,random,time,collections

CodeExtensions = ('.py', '.c','.cpp','.rb','.js','.pl','.cs','.el')
last_exts = collections.deque(CodeExtensions[:1],100)

def maketestname(filename):
    root,ext = os.path.splitext(filename)
    if ext in CodeExtensions:
        ext = random.choice(last_exts)
    return 'test_'+root+ext

def banner(char,text,width=70):
    bar = char*((width-len(text)-2)/2)
    return "{} {} {}".format(bar,text,bar)

def scaledrand(scale,offset):
    return random.random()*scale+random.randrange(offset)

while True:
    for dirname, subdirs, files in os.walk('.'):
        print banner('=',"entering {}".format(dirname))
        skipped = 0
        for filename in files:
            if filename[0] is not '.':
                testfilename = maketestname(filename)
                print banner('-',testfilename)
                filelen = os.path.getsize(os.path.join(dirname,filename))
                maxlen = max(maxlen,filelen)
                ntests = int(scaledrand(20*filelen/maxlen,10))
            testtime = scaledrand(ntests/5.0,2)

            print "Ran {} tests in {} seconds, {} errors".format(ntests,testtime,0)
        print "{} modules OK ({} failed)\n".format(len(files)-skipped,0)
You could also just run the Python regression tests, which are bundled with most Python installs. – nneonneo Jun 11 '14 at 19:42
But those finish eventually. – AShelly Jun 11 '14 at 20:10
then you could run a loop! – nneonneo Jun 12 '14 at 0:17
I'm also thinking it's less suspicious to test files with names related to your projects than to test the Python source. I'm guessing most of us don't professionally maintain Python... – AShelly Jun 12 '14 at 14:22

Java + Guava 16 (Guava isn't super necessary, but it made some things a little less annoying to write).

Alright, you're supposed to be working? How about a program that actually writes real Java code, that actually compiles (though it doesn't do much).

It's difficult to demonstrate the animation, but this program writes a Java program using either the default dictionary (250 common English words) or a newline delimited file (taken as a command line argument), and types it to the console one character at a time at human seeming speeds. Make sure to run it yourself because this post doesn't do it justice. When it finishes, it waits 1 minute, then prints a lot of blank lines to the console, and starts over again. I tried to write it to make various parameters reasonably tweakable.

Also, normally I would put this into more than one file, but to make it easier to run I smushed all the classes together.

package org.stackoverflow.ppcg;

import java.util.*;


public class CodeGenerator {
    public static final Converter<String, String> TOUPPER =
    public static final Converter<String, String> TOLOWER =

    public static final String[] TYPES = new String[]{
        "int", "long", "double", "String"

    public static final List<String> DEFAULT_LIST = Arrays.asList(new String[]{
            "the", "and", "for", "you", "say", "but", "his", "not", "she", "can",
            "who", "get", "her", "all", "one", "out", "see", "him", "now", "how",
            "its", "our", "two", "way", "new", "day", "use", "man", "one", "her",
            "any", "may", "try", "ask", "too", "own", "out", "put", "old", "why",
            "let", "big", "few", "run", "off", "all", "lot", "eye", "job", "far",
            "have", "that", "with", "this", "they", "from", "that", "what", "make", "know",
            "will", "time", "year", "when", "them", "some", "take", "into", "just", "your",
            "come", "than", "like", "then", "more", "want", "look", "also", "more", "find",
            "here", "give", "many", "well", "only", "tell", "very", "even", "back", "good",
            "life", "work", "down", "call", "over", "last", "need", "feel", "when", "high",
            "their", "would", "about", "there", "think", "which", "could", "other", "these", "first",
            "thing", "those", "woman", "child", "there", "after", "world", "still", "three", "state",
            "never", "leave", "while", "great", "group", "begin", "where", "every", "start", "might",
            "about", "place", "again", "where", "right", "small", "night", "point", "today", "bring",
            "large", "under", "water", "write", "money", "story", "young", "month", "right", "study",
            "people", "should", "school", "become", "really", "family", "system", "during", "number", "always",
            "happen", "before", "mother", "though", "little", "around", "friend", "father", "member", "almost",
            "change", "minute", "social", "follow", "around", "parent", "create", "others", "office", "health",
            "person", "within", "result", "change", "reason", "before", "moment", "enough", "across", "second",
            "toward", "policy", "appear", "market", "expect", "nation", "course", "behind", "remain", "effect",
            "because", "through", "between", "another", "student", "country", "problem", "against", "company", "program",
            "believe", "without", "million", "provide", "service", "however", "include", "several", "nothing", "whether",
            "already", "history", "morning", "himself", "teacher", "process", "college", "someone", "suggest", "control",
            "perhaps", "require", "finally", "explain", "develop", "federal", "receive", "society", "because", "special",
            "support", "project", "produce", "picture", "product", "patient", "certain", "support", "century", "culture"

    private static final int CLASS_NAME_LENGTH = 2;

    private final WordList wordList;
    private final Appendable out;
    private final Random r = new Random();

    private CodeGenerator(WordList wordList, Appendable out) {
        this.wordList = wordList;
        this.out = out;

    public static void main(String... args) throws Exception {
        List<?> wordSource = getWords(args);
        WordList list = new WordList(wordSource);
        SleepingAppendable out = new SleepingAppendable(System.out);
        CodeGenerator generator = new CodeGenerator(list, out);
        while(!Thread.interrupted()) {
            try {
            } catch (InterruptedException e) {
            for(int i = 0; i < 100; i++) {

    private static List<?> getWords(String[] args) {
        if(args.length > 0) {
            try {
                return getListFromFile(args[0]);
            } catch(IOException e) { }
        return DEFAULT_LIST;

    private static List<Object> getListFromFile(String string) throws IOException {
        List<Object> newList = Lists.newArrayList();

        File f = new File(string);
        Scanner s = new Scanner(f);

        while(s.hasNext()) {

        return newList;

    private void generate() throws IOException {
        String className = beginClass();
        List<Field> finalFields = generateFields(true);
        List<Field> mutableFields = generateFields(false);
        printConstructor(className, finalFields);

    private void printGetters(List<Field> fields) throws IOException {
        for(Field f : fields) {

    private void printSetters(List<Field> fields) throws IOException {
        for(Field f : fields) {

    private void printConstructor(String className, List<Field> finalFields) throws IOException {
        out.append("\tpublic ").append(className).append('(');
        out.append(") {").append(System.lineSeparator());
        for(Field f : finalFields) {

    private void printArgs(List<Field> finalFields) throws IOException {
        if(finalFields.size() == 0) return;

        Iterator<Field> iter = finalFields.iterator();

        while(true) {
            Field next =;
            if(!iter.hasNext()) break;
            out.append(", ");

    private List<Field> generateFields(boolean isfinal) {
        int numFields = r.nextInt(3) + 2;
        List<Field> newFields = Lists.newArrayListWithCapacity(numFields);
        for(int i = 0; i < numFields; i++) {
            String type = TYPES[r.nextInt(4)];
            newFields.add(new Field(type, wordList.makeLower(r.nextInt(2) + 1), isfinal));
        return newFields;

    private void printFields(List<Field> finalFields) throws IOException {
        for(Field f : finalFields) {

    private String beginClass() throws IOException {
        out.append("public class ");
        String className = wordList.nextClassName(CLASS_NAME_LENGTH);
        out.append(className).append(" {").append(System.lineSeparator());

        return className;

    private void endClass() throws IOException {

    private static class WordList {
        private final Random r = new Random();

        private final List<?> source;

        private WordList(List<?> source) {
            this.source = source;

        private String makeUpper(int length) {
            StringBuilder sb = new StringBuilder();
            for(int i = 0; i < length; i++) {
            return sb.toString();

        private String makeLower(int length) {
            return TOLOWER.convert(makeUpper(length));

        private String randomWord() {
            int sourceIndex = r.nextInt(source.size());
            return TOUPPER.convert(source.get(sourceIndex).toString().toLowerCase());

        public String nextClassName(int length) {
            return makeUpper(length);

    private static class Field {
        private final String type;
        private final String fieldName;
        private final boolean isfinal;

        Field(String type, String fieldName, boolean isfinal) {
            this.type = type;
            this.fieldName = fieldName;
            this.isfinal = isfinal;

        void printFieldDeclaration(Appendable appendable) throws IOException {
            appendable.append("\tprivate ");
            if(isfinal) appendable.append("final ");

        void printTypeAndName(Appendable appendable) throws IOException {
            appendable.append(type).append(' ').append(fieldName);

        void printGetter(Appendable appendable) throws IOException {
            appendable.append("\tpublic ");
            appendable.append(type).append(" get").append(TOUPPER.convert(fieldName));
            appendable.append("() {").append(System.lineSeparator());
            appendable.append("\t\treturn ").append(fieldName).append(';');

        void printSetter(Appendable appendable) throws IOException {
            appendable.append("\tpublic void set");
            appendable.append("(").append(type).append(' ').append(fieldName);
            appendable.append(") {").append(System.lineSeparator());

        void printAssignment(Appendable appendable) throws IOException {
            appendable.append("\t\tthis.").append(fieldName).append(" = ").append(fieldName);

    private static class SleepingAppendable implements Appendable {
        private Random r = new Random();
        private Appendable backing;

        private boolean sleeping = true;

        public SleepingAppendable(Appendable backing) {
            this.backing = backing;

        public Appendable append(CharSequence csq) throws IOException {
            return append(csq, 0, csq.length());

        public Appendable append(CharSequence csq, int start, int end)
                throws IOException {
            for(int i = start; i < end; i++) {

            sleep(100, 300);

            return this;

        public Appendable append(char c) throws IOException {
            sleep(170, 80);


            return this;

        private void sleep(int base, int variation) {
            if(!sleeping) return;
            try {
                Thread.sleep((long) (r.nextInt(80) + 70));
            } catch (InterruptedException e) {

        public boolean isSleeping() {
            return sleeping;

        public void setSleeping(boolean sleeping) {
            this.sleeping = sleeping;

Sample program output (just one program)

public class GetGroup {
    private final double thoughRight;
    private final double socialYear;
    private final double manOne;
    private final int appear;

    private double man;
    private double comeHis;
    private double certain;

    public GetGroup(double thoughRight, double socialYear, double manOne, int appear) {
        this.thoughRight = thoughRight;
        this.socialYear = socialYear;
        this.manOne = manOne;
        this.appear = appear;

    public double getThoughRight() {
        return thoughRight;

    public double getSocialYear() {
        return socialYear;

    public double getManOne() {
        return manOne;

    public int getAppear() {
        return appear;

    public double getMan() {
        return man;

    public double getComeHis() {
        return comeHis;

    public double getCertain() {
        return certain;

    public void setMan(double man) { = man;

    public void setComeHis(double comeHis) {
        this.comeHis = comeHis;

    public void setCertain(double certain) {
        this.certain = certain;

Another sample output:

public class TryControl {
    private final int over;
    private final double thatState;
    private final long jobInto;
    private final long canPut;

    private int policy;
    private int neverWhile;

    public TryControl(int over, double thatState, long jobInto, long canPut) {
        this.over = over;
        this.thatState = thatState;
        this.jobInto = jobInto;
        this.canPut = canPut;

    public int getOver() {
        return over;

    public double getThatState() {
        return thatState;

    public long getJobInto() {
        return jobInto;

    public long getCanPut() {
        return canPut;

    public int getPolicy() {
        return policy;

    public int getNeverWhile() {
        return neverWhile;

    public void setPolicy(int policy) {
        this.policy = policy;

    public void setNeverWhile(int neverWhile) {
        this.neverWhile = neverWhile;
You've made a fully-automatic money printing machine for anyone still paid by lines-of-code - great job! – Philipp Jun 14 '14 at 21:03


Output some comments from random source files at random intervals, followed by a randomly generated do-nothing progress bar.


# The directory to extract source comments from

# Generate a status bar that lasts a random amount of time.
# The actual amount of time is somewhere between 1.5 and 30
# seconds... I think. I fudged this around so much it's hard to tell.
function randstatus() {
    r_rate=$(echo "$RANDOM/32767 * $bsize * 1.5 + $bsize / 4" | bc -l | sed 's/\..*$//')
    r_val=$(($r_min + $RANDOM % $(($r_max - $r_min)) ))
    dd if=/dev/urandom bs=$bsize count=$r_val 2> /dev/null | pv -L $bsize -s $(($r_val * bsize)) > /dev/null

# Picks a random .c file from the given directory, parses
# out one-line comments, and outputs them one by one with a
# random delay between each line.
function randout() {
    r_file=$(find $1 -name '*.c' | sort -R | head -n 1)
    echo "# $r_file"
    grep '^\s*/\*.*\*/\s*$' $r_file | sed 's:[/\*]::g' | sed -e 's:^\s\+::' -e 's:\s\+$::' | sed -e 's:^\W\+::' | grep -v '^$' | while read line; do
        echo $line
        sleep $(printf "%0.2f" $(echo "$((($RANDOM%4)+1))/4" | bc -l))

while true; do
    randout $srcdir
    # sleep here to make it easier to break out of the 'while read' loop
    sleep 2


# /home/jerkface/src/php-src/sapi/fpm/fpm/fpm_shm.c
Id: fpm_shm.c,v 1.3 20080524 17:38:47 anight Exp $
c) 2007,2008 Andrei Nigmatulin, Jerome Loyet
MAP_ANON is deprecated, but not in macosx
  32kB 0:00:08 [3.97kB/s] [====================================================================>] 100%
# /home/jerkface/src/php-src/ext/mbstring/mb_gpc.c
mbfl_no_encoding _php_mb_encoding_handler_ex()
split and decode the query
initialize converter
auto detect
convert encoding
we need val to be emalloc()ed
add variable to symbol table
  12kB 0:00:03 [4.02kB/s] [===============>                                                      ] 24% ETA 0:00:09
Clever! It's a little late to receive more attention, but take a high five from me. – SomeKittens Jun 20 '14 at 23:05
@SomeKittens The real genius of this script is that working on it looks even more like real work. ;D – Sammitch Jun 20 '14 at 23:20

Rsync form BASH

 rsync -n -avrIc --verbose  ~ ~ | sed s/"(DRY RUN)"/""/g    
# Note the space at the beginning of the above line,

rsync - a fast, versatile, remote (and local) file-copying tool... that with -n performs a dry run, only try to do, do not really do, and shows what happens.
In this case try to check if to update all file of your home directory (and sub-folders).
If you have the root access of course you can run it on a bigger part of your filesystem.


  1. If HISTCONTROL=ignoreboth or at least HISTCONTROL=ignorespace in your bash session your bash history will not remember that command if you write it with a space before. (You cannot push up and see it on the screen, neither in the history log).
  2. | sed s/"(DRY RUN)"/""/g will pipe the output through sed that will erase the (DRY RUN) text at the end of the rsync output. If an expert check you can say you really doing that, not only testing.
  3. -avrIc you can change those options, check on man rsync, but never remove the -n, else you should have serious problem, even more if you run as root... 8-O!

Maven under bash

Maven is just perfect for this kind of task ;-)

while true;
do mvn -X archetype:generate -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false;


This opens a console window that loops through various fake objects and assorted things, incrementing in passes and progress for each pass. It waits for a small random time each increment, to simulate actual computation delays.

class Does_Nothing_Useful
    var _rng as Random = Random()
    var _hash
    var _pass
    var _names as String[] = @['Vector', 'Object', 'File', 'Index', 'Report', 'Library', 'Entry', 'Log', 'Resource', 'Directory']
    def main
        while true
            name as String = _names[] + ' ' + _hash.toString
            for i in _pass
                progress as decimal = 0
                while progress < 100000
                    progress +=
                    print name + '; pass', i, ' : ', progress/1000
                    wait as int = 0
                    for n in, wait +=,100)
                print name + '; pass', i, '--FINISHED--'
                print ''
            print name, '--EVAL COMPLETE--'
            print ''
    def refresh
        _hash =
        _pass =
        print '--LOADING NEXT TARGET--'
        print ''
You've got the whole weekend to work on this, so take your time. – SomeKittens Jun 7 '14 at 6:14
What is this Cobra language, it looks like the bastard child of Python and C#, haha (looking it up it does seem to have some interesting features though), +1 – Thomas Jun 7 '14 at 12:37
@Thomas For the most part, it's C# (currently without LINQ) using Python-esque syntax. And one of the most helpful default compilers I've ever had the pleasure of working with. – Ourous Jun 8 '14 at 0:51
So did you ever end up completing this code? – rayryeng Sep 26 '15 at 16:46

I wrote a stupid python script to do this once. Called "ProgramAboutNothing"... I'm not sure it's that convincing but it only took me about 10 minutes. It just outputs random sentences describing what it is supposedly doing... I could probably have chosen better words for it that might look more convincing but I never actually used it properly. I guess if someone wants to use it they can edit it and add their own words in the lists... Fans of Sim City might notice something familiar, though. :P

from random import randrange
from time import sleep

nouns = ["bridge", "interface", "artifact", "spline"]
verbs = ["building", "articulating", "reticulating", "compiling", "analyzing"]
adjectives = ["mix", "abstract", "essential"]

while True:
    one = randrange(0,5)
    two = randrange(0,4)
    print "%s %s" % (verbs[one], nouns[two]),
    print ".",
    print ".",
    print ".\n",
    loop = randrange(0,50)
    one = randrange(0,5)
    for i in range(loop):
        two = randrange(0,4)
        three = randrange(0,3)
        print "%s %s %s" % (verbs[one], nouns[two], adjectives[three]),
        print ".",
        print ".",
        print ".\n",
Maybe you're using Python 3? Try adding parentheses around the print statements like this: print( ... ). – daviewales Jun 11 '14 at 13:55
@daviewales ninja'd :P – Luke Jun 11 '14 at 13:56
@Luke I've just installed Python 3.4.1 for Windows. I can't program in Python, but i'm interested in your little program... – Mathlight Jun 11 '14 at 13:56
@Mathlight prepare to be underwhelmed. :P – Luke Jun 11 '14 at 13:57
@luke, It's working now. And i'm impressed ^_^ – Mathlight Jun 11 '14 at 13:58

How about this one? It will download the codegolf HTML data every 1 second. So, the data will keep on changing as long as the newer questions come in. At the same time, it will also appear as if you are downloading some critical data from a website.

while true; do     
sleep 1;     
curl "" -s |  w3m -dump -T text/html; 


The recursive directory list:

ll -R /

This is a C++ Compiler Simulation (written in C#):

using System;
using System.Collections.Generic;
using System.Management;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.IO;
using System.Reflection;

class FakeCompiler {
    static void DoPrint(string txt) {
        Console.WriteLine("Compiling " + txt);
    static string Extract(string TypeName) {
        string rt = TypeName.Split(new Char[] {'.'})[ TypeName.Split(new Char[] {'.'}).Length - 1 ];
        if (rt.Contains("+")) {
            rt = rt.Split(new char[] { '+' })[1];
        if (rt.Contains("[")) {
            rt = rt.Split(new char[] { '[' })[0];
        return rt;
    static void DoCompileSingleFile(string _Type_Name) {
        string print = Extract(_Type_Name);
        DoPrint(print + ".h");
        DoPrint(print + ".cpp");
    static Type[] DoFakeCompile_Assembly(string _AssemblyFileName) {
        System.Reflection.Assembly _asm = System.Reflection.Assembly.Load(_AssemblyFileName);
        Type[] _ts = _asm.GetTypes();
        for (int h = 0; h < 15; ++h) {
        return _ts;
    static void DoFakeLinkErrors(Type[] t) {
        MethodInfo[] mi;
        for (int i = 0; i < t.Length; ++i) {
            mi = t[i].GetMethods();
            for (int j = 0; j < mi.Length; ++j) {
                Console.WriteLine("Link Error: The object {@!" + mi[j].ToString().Split(new char[] {' '})[0] + "#$? is already defined in " + Extract(t[i].ToString()) + ".obj");
    static void Main(string[] args) {
        Console.WriteLine("Fictional C/C++ Optimizing Command-line Compiler Version 103.33.0");

xdotool and an IDE (for example eclipse)

For X11 users.

Use this script and make sure you just Alt+tab'ed from Eclipse. You need a java file. For example here:


xdotool key alt+Tab
xdotool sleep 0.2
xdotool type --delay 300 "$(cat"
xdotool key alt+Tab


Place in a folder with a lot of files. If it scrolls by fast enough, no one will suspect anything.

echo %RANDOM%
echo %RANDOM%
echo %RANDOM% 
goto l
emerge @world

full recompile on gentoo

I'm pretty sure the availability of this primo excuse is the leading reason to run Gentoo at all. – Caleb Aug 15 '15 at 10:02

protected by Doorknob Jun 14 '14 at 21:14

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.