Thursday, July 21, 2011

Nyan Cat Progress Bar

154 comment(s)
First, a screenshot =]



This only works on Windows7 guys., here's how you get those progress bars all pop-tarty and rainbow-filled.,XD
  1. Download the Nyan Cat Progress Bar App from here
    Latest version: 2.1.1.1 (updated 12/7/2011)
    SHA-1 hash: 464f4cef5720faa5e1bf4c5698ea6eee6509ea00
  2. Extract the ZIP file to a folder.
  3. Run NyanCatProgressBar.exe
  4. Try copying some files in Windows Explorer. :)
  5. watch as what once was a boring progress bar, now is a cherry-poptart cat spewing rainbow colored epicosity.,XD
In some cases though you wouldn't want the cat to be nyaning as you copy (yes, it plays the nyancat song as you copy.,XD)., especially if you're like downloading gigabytes of files... so..

Here are the ways on how you can de-Nyan the Cat:

  • Right-click the Nyan Cat Progress Bar icon in your system tray (near the clock at the lower right portion of the screen) and choose "Silence!" to stop the Nyan Cat from automatically activating.
  • If you don't want Nyan Cat to activate while you're listening to music in either iTunes or Winamp, you can right-click the Nyan Cat Progress Bar icon, choose Settings, and then tick the "Don't show Nyan Cat if I'm listening to music in iTunes or Winamp" checkbox.

Though I got the nyan cat progress bar info from Phillip De Franco, (yeah, I'm proud to be part of the Philly-D NAtion - youtube.com/sxephil - listening to him ramble about random things make my days more interesting =]) I actually was able to DL the app from the link at Ben Stone's blog here - http://www.instantelevatormusic.com/nyan-cat-progress-bar

Here's to happy nyan-filled days of copying files here and there.,XDXD i love you guys.,


◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇

Sunday, July 3, 2011

running objective-c on ubuntu

164 comment(s)
today i've successfully compiled an objective C program to run in a linux based operating system (ubuntu-LTS [10.04]) by following a number of tutorials in the interwebs.,.,

(following just a single author couldn't get the job done... primarily because updates in operating systems occur so fast.,.,). Granted that this post will be valid for at least 6 months before all the updates occur again, here are the consolidated steps on how I managed to compile and run an objective-C program in ubuntu 10.04

(1) run the following in your terminal to get all the needed dependencies

sudo apt-get install gobjc gnustep gnustep-make gnustep-common

(1.1) later if you get errors similar to these

/usr/share/GNUstep/Makefiles/GNUstep.sh:288: no such file or directory: /usr/share/GNUstep/Makefiles/print_unique_pathlist.sh

make sure that you've edited your start-up shell script ( bash.bashrc ) which is found in /etc folder to have the following lines

#GNUSTEP Environment vars
. /usr/share/GNUstep/Makefiles/GNUstep.sh

editing the file by just clicking on it would open the file in read-only mode. i used gedit in superuser mode to address this

sudo gedit bash.bashrc

after after editing the bash file, remember to refresh for the updates.,by typing in "bash" in the terminal

bash

(2) download the Foundation.h/Foundation library

sudo apt-get install libgnustep-base-dev

(3) write test codes

// for the file hello.h

#import <Foundation/Foundation.h>

@interface Hello : NSObject{


NSString* name;


}

+(NSString*) details;

-(NSString*) name;

-(void) setName : (NSString*)newName;

@end

// for the file hello.m

#include "hello.h"
@implementation Hello


+(NSString*) details {

return @"This is a string.";

}

-(NSString*) name {

return name;

}

-(void) setName: (NSString*)newName {

[name release];

name = [newName retain];

}


@end


//for the file helloworld.m

#include "hello.h"
int main(int n, const char* argv[]) {

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

NSString* s = [Hello details];

printf("Result from a static call: %s\n", [s UTF8String]);

Hello* hello = [[Hello alloc] init];

printf("Name is not initialized: %s\n", [[hello name] UTF8String]);

[hello setName: @"Jeff"];

printf("Your name is %s\n", [[hello name] UTF8String]);


[pool drain];


return 0;

}


(4) compile using a makefile

i've set my Filename (patterned after FatVat's tutorial) to 'GNUmakefile' which contained the following terminal commands

include $(GNUSTEP_MAKEFILES)/common.make
APP_NAME = Hello

Hello_OBJC_FILES = hello.m helloworld.m
include $(GNUSTEP_MAKEFILES)/application.make

or if you want to compile your files individually you make use

gcc `gnustep-config --objc-flags` -o test test.m -lobjc -lgnustep-base

where test.m is your implementation file and test is the name you've given it


and that's pretty much it... This topic still is very interesting for me., now that i've been looking at the blogs of people who claim to have installed the cocoa.h library that can be used for GUI.

◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇◇