Showing posts with label a gentleman and a hacker. Show all posts
Showing posts with label a gentleman and a hacker. Show all posts

Friday, February 27, 2009

Quality Hackers Satchel


Quality Hackers Satchel, originally uploaded by bsdpunkblog.

So I encourage two things when purchasing or otherwise procuring/building a tool, and that is....that it is a quality tool and DIY if you can. Sometimes you choose things you think are quality but, they aren't, like maybe a 300 dollar monitor that doesn't come with a dvi cord....**cough WESTINGHOUSE cough**.However somethings are just great. My hackers satchel for instance..it's tough and awesome. It has 140k pockets 20 of witch are zippered. But it's best feature is that it was made by my grrl. This satchel rocks. Hoorah for DIY.

Wednesday, February 18, 2009

Stabby MCstab stab, NXT Spike, programmed in perl, powered by twitter, he rocks your world


I couldn't just do, an "I love twitter" post, or twitter is so awesome it's my new favorite form of communication. No I have to show it's awesomeness.And that's why I made a robot that can knife people over twitter. That's right, I strapped a knife to spike, and you can control him over twitter. I am going to get stickam going so you can watch and control the robot over twitter, but only for the next few hours. To extend the tail send an @twitrnxtbot tail to retract the tail send a @twitrnxtbot retract. To get him to move forward send a @twitrnxtbot anythinggoeshere. Watch him. Control him.

So just to sum this up, if you ever had one of those moments when you wanted to stab someone on the other end of the computer...you can now.

As for some NXT resources, I know that all of you read english, and about half of you can read another language as well. You might need a translator on this one but it's a good resource: http://compilamasnaoroda.blogspot.com/ .

As for spike, I am thinking of adding features that let him communicate with the world, such as, the ability to tweet, that he is stuck, or he has attacked something of his own volition.

I modified the twitter code, that was originally made to display growl messages from here.

use Sys::Hostname;
use strict;
use warnings;
use LEGO::NXT;
use LEGO::NXT::Constants qw(:DEFAULT);
use LEGO::NXT::MacBlueComm;
use Mac::Growl ':all';
use Net::Twitter;
use Date::Format;
my $capsule = int(rand(99));
my $dev = new LEGO::NXT::MacBlueComm('/dev/tty.NXT-DevB-1');
my $bt = new LEGO::NXT( $dev );
my $speed = 100;
my $tachoticks = 1000;
my $tailFtac = 1000;
my $tailBtac = 1000;
my $tailSpeed = 100;
my $tailBSpeed = -100;
my $backSpeed = -100;
my $app = 'Growl/Twitter';
my @names = ('New Tweet');
my $bob = "test";
my $tail = "tail";
my $retract = "retract";
RegisterNotifications($app, \@names, [$names[0]]);

my $tweet = Net::Twitter->new( username=>'twitrnxtbot', password=>'password' );

my $last_id = undef;
my $switch = 0;

while(1)
{
my @tt = ();

if($last_id)
{
@tt = $tweet->friends_timeline({count => 5, since_id => $last_id });
}
else
{
@tt = $tweet->friends_timeline({count => 5 });
}

foreach my $t (@{$tt[0]})
{
my $target = $t->{text};
if($target =~ m/$tail/i){
$bt->set_output_state( $NXT_NORET, $NXT_MOTOR_A, $tailSpeed, $NXT_MOTOR_ON|$NXT_REGULATED, $NXT_REGULATION_MODE_MOTOR_SPEED, 0, $NXT_MOTOR_RUN_STATE_RUNNING, $tailFtac );
}elsif($target =~ m/$retract/i) {
$bt->set_output_state( $NXT_NORET, $NXT_MOTOR_A, $tailBSpeed, $NXT_MOTOR_ON|$NXT_REGULATED, $NXT_REGULATION_MODE_MOTOR_SPEED, 0, $NXT_MOTOR_RUN_STATE_RUNNING, $tailBtac );
}
else
{
print $target;
$bt->set_output_state( $NXT_NORET, $NXT_MOTOR_B, $speed, $NXT_MOTOR_ON|$NXT_REGULATED, $NXT_REGULATION_MODE_MOTOR_SPEED, 0, $NXT_MOTOR_RUN_STATE_RUNNING, $tachoticks );
$bt->set_output_state( $NXT_NORET, $NXT_MOTOR_C, $speed, $NXT_MOTOR_ON|$NXT_REGULATED, $NXT_REGULATION_MODE_MOTOR_SPEED, 0, $NXT_MOTOR_RUN_STATE_RUNNING, $tachoticks );
$bt->keep_alive($NXT_NORET);
}
PostNotification($app, $names[0], $t->{user}{screen_name}, $t->{text});

printf("%s: %s\n", $t->{user}{screen_name}, $t->{text});
print "sleep 4\n";

sleep(4);
}

$switch = 0;
print "sleep 4\n";
sleep(4);
}

exit;

Tuesday, December 23, 2008

Gentleman's MalWare license

With my blog entry about my bot I introduced the Gentleman's MalWare license, which is to say something very similar to the GPL or in equivalent to the creative commons license shown below.
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.