I'm a big fan of dj Steve Porter and Jay Z....Man I love this shit.
Tuesday, September 15, 2009
DIY djsteveporter kanye west and jay z
Tuesday, August 18, 2009
Single and Famous, Kflay and MC Lars
Yeah I think Lars is a douche.....that being said, he knows how to rock.
Monday, April 13, 2009
Watch people as they die...or I love twitter...Ruby RSS tutorial
This is a tutorial to get ruby working with rss...in style. So I decide I wanted to have one of my LCD monitors to constantly scroll people's names as they died...but how would I achieve this feat? Well with a simple script that called several twitter feeds. At first I tried perl but as I was installing one of the modules I had a really HORRIBLE time trying to get it to work. So what I ended up doing is switching to ruby.* So there are three twitter feeds I choose to use...One was just the feed for #obits, I also wanted to use mydeathspace and the LA Times Obituary account. You can accummulate these feeds by going to search.twitter.com then, searching for something, then clickiing the, "I want the feed for this query" or something like that.
This tutorial assumes you have ruby and gems installed.
So the first thing I had to do was install the module...err gem for rss, for ruby, which is simple enough:
gem install simple-rss
Then I wrote this code I ripped off of about:
#!/usr/bin/env ruby
require 'rubygems'
require 'simple-rss'
require 'open-uri'
rss = SimpleRSS.parse(
open('http://search.twitter.com/search.atom?q=%23obit').read
)
rss.items.each do|i|
puts "Title: #{i.title}"
puts "Link: #{i.link}"
puts "=" * 80
end
Obviously I wasn't happy with that, for one I wanted a slow scroll and I wanted multiple feeds and I wanted it to loop so that it would always be outputting. So I added some sleeps and a loop like so:
#!/usr/bin/env ruby
require 'rubygems'
require 'simple-rss'
require 'open-uri'
loop {
rss = SimpleRSS.parse(
open('http://search.twitter.com/search.atom?q=%23obit').read
)
rss.items.each do|i|
puts "Title: #{i.title}"
puts "Link: #{i.link}"
puts "=" * 80
sleep 1
end
sleep 1
rssTwo = SimpleRSS.parse(
open('http://search.twitter.com/search.atom?q=+from%3Amydeathspace').read
)
rssTwo.items.each do|i|
puts "Title: #{i.title}"
puts "Link: #{i.link}"
puts "=" * 80
sleep 1
end
sleep 1
rssThree = SimpleRSS.parse(
open('http://search.twitter.com/search.atom?q=+from%3Alatimesobits').read
)
rssThree.items.each do|i|
puts "Title: #{i.title}"
puts "Link: #{i.link}"
puts "=" * 80
sleep 1
end
sleep 1
}
And there you go, now I have a monitor that basically let's me watch people die.....I am so happy.
*BTW if you are a perl guru and know how I can fix my UserAgent stuff, with a parse_head error, it would be awesomely cool if you could help me out.
Tuesday, February 24, 2009
So I want to do a video series called Drinking with BSDPunk a begginers guide to python...but
I want to do video tutorials for python, for my readers. Ok Ok I hear criticism from my fans, why why not perl. Well I am pretty ok with perl, and I am trying to hone another skill to increase my skillset. That being said I want to teach python as I learn. So this video would entail a drunken youtubed BSDPunk teaching python, however I am incredibly busy, but I could make time if the interest is there. So if you want this series to happen I need some comments or something to let me know more than EdgeX- would watch.
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;
Monday, February 9, 2009
Spike IRC NXT Mindstorm Video, using perl bot
So this video doesn't really show much, but whatevs. I will hopefully have the cleaned up code with a few new functions posted tomorrow.
Sunday, January 11, 2009
How to install FreeBSD youtube video by BSDPunk
I made this video really quickly, to show how to install FreeBSD. I tried to cut my rambling out, but may have made the video less coherent in doing so. Anyways, enjoy the goodness. I installed it on vmware fusion for the mac but the install is identical on a machine and pretty close on any vmware product. Don't use virtual box yet, it has freebsd bugs.