Pink is the New Black![]() Pink is the New Black Variety blog focused on programming, PHP, MySQL, Ruby, and random entries on life and humor. Blog also contains themes and wallpaper Articles
Ruby Isn?t Too Bad
2007-05-02 11:52:00 I haven’t really had a whole time to play around with Ruby , but I managed to write a little script that I call boobs.rb. It was my attempt to take advantage of Ruby’s ability to define your own functions. Maybe if I’m lucky I would be able to actually define my own bra ...
The Bad-Ass Goon Squad
2007-04-30 03:32:00 I was finally able to get the dogs together to show you why I don’t need to lock my doors at night. They didn’t want to pose nude, but hey, I have a website to run. Click for a larger image: The sexy man on the left is Timber (Pitbull, 90 lbs), ... More About: Goon , Quad , Squad
Mark Zuckerberg is a Buttmunch
2007-04-29 18:02:00 It takes a real ego to turn down $2 BILLION dollars. That’s exactly what Mark Zucker berg, the Founder/CEO of Facebook, did when Yahoo and Viacom offered to buy him out. I was reading this in Fast Company this morning and I was couldn’t believe that two of the largest marketing ... More About: Butt , Berg
PHP 5.2.1 is a Remote Include Hater
2007-04-28 22:34:00 I found this out after troubleshooting a few sites a couple weeks ago. Unlike all other previous versions of PHP, with 5.2.1 you can no longer use a URL to include files, even if you have allow_url_fopen enabled in your php.ini. Just a quickie about what an ‘include’ is, it’s a php function that ... More About: Remote , Hater , Mote
Top 10 Ways Websites Makes Me Suffer
2007-04-25 20:20:00 By: Jason O’Connor I believe some people create and publish websites for the sole purpose of tormenting their visitors. Browsing various websites and navigating the Web can often be like trying to read on an airplane while a kid kicks the back of your seat and the baby next to you alternates between screaming, crying and ... More About: Websites , Make
OneDayBlogSilence
2007-04-25 03:35:00 I received a note from a friend that on April 30th, participating blogs are supposed to do a blank post with nothing but a single graphic, as a way of honoring the people who were shot at VA tech earlier. I’m not usually one to bathe in tragedy after it happens, but since ... More About: Logs , Silence
Happy Birthday to Meeeeeeeee
2007-04-22 23:28:00 Yes, I turned twenty yesterday and my liver is still reminding me. The picture below is really the only one that came out, mainly because the person taking it was the only one who wasn’t plastered. So enjoy it, print it out, tape it to your ceiling, and grab yourself a paper ... More About: Happy , Birthday , Birth , Happy Birthday
Sohosin Will Make your PHP Hard
2007-04-20 13:53:00 I noticed a vague mention of Soho sin on a PHP blog that I read on occasion and I decided to give it a whirl to see if it’s as sexy as is sounds. So far my server hasn’t crashed, so I’m willing to recommend it to anyone who’s interested in hardening their PHP. ... More About: Your , Hard , Will , Make
Optimizing PHP, Revisited.
2007-04-16 14:34:00 I wrote an article a while back on PHP optimization, but it was pretty lacking in most aspects, probably because I’m a lazy poster. I’ve revisited that article and reposted to hopfully have it be a little more helpful on the area. More About: Php , Site , Visi , Visit , Opti
Timing Your PHP Scripts
2007-04-15 14:52:00 This was just a little code addon that I put together as part of a tutorial I wrote on a friend’s site (and copied on mine) about PHP optimization. Added to a page on your site, it will calculate how much time it took for a page or script to execute using PHP’s ... More About: Php , Scripts , Script , Your , Ming
13 Sexiest Wordpress Plugins
2007-04-13 11:31:00 I decided to post a list of the Word press plugins that I’ve found to be the most useful, a majority of which I use on my own site. More About: Wordpress Plugins , Press , Plugins
This Comic Might be Dirty
2007-03-23 06:55:00 YBNBY just posted a list of the top ten most subliminally dirty old comic book panels. If you ask me, it looks like the authors of these comic books were trying to be obvious without looking like they were being obvious. It’s kind of like driving down the boardwalk blaring Celine Dion and ... More About: Comic , Dirty , This , Dirt
Firefox is a CPU Molester
2007-03-22 05:06:00 XP and Vista users, you might want to hold off on the new Fire fox 2.0.0.3 update until it gets neutered. Yes, Firefox violated my CPU today. No, not once, but 12 times. Yes, 12 times in the last half hour. Talk about stamina. My poor AMD now has performance ... More About: Este , Mole , Lester
Keep People from Jacking your Images
2007-03-19 22:06:00 I get this question a lot, so I figured I’d post it here. For those of you who don’t have the convenience of a cPanel-based system, you can block image hotlinking in your .htaccess. Image hotlinking is basically when someone uses an image from your website on their site, but has your ... More About: People , Images , Your , Jack , Keep
My Puppy?s Cuter than Yours
2007-03-19 01:59:00 For anyone who hasn’t met the newest addition to the Vasilé family, I’d like to introduce you to Capone. He’s a purebred pitbull currently at 12 weeks, 25 lbs. His vet estimated that based on his genes he’s probably going to reach about 80-90 lbs by the time he’s a year ... More About: Cute , Your , Puppy
Preventing DOS Attacks with mod_evasive
2007-03-18 06:07:00 I recently had to deal with a guy whos VPS was constantly being hit by the same IPs over and over until the server crapped out and refused to do anything…it was royally a pain in the ass because I literally had about 10 seconds between starting up the server and having it crash ... More About: Event , With , Attacks , Vent , Tacks
Increase Your Blog Traffic
2007-03-16 01:00:00 Yes, it’s another one of those. It seems that every blog has its own tips for increasing traffic, so I decided to add my own tips that seem to have worked for my site More About: Blog Traffic , Traffic , Blog , Your , Ease
Wordpress 2.1.1 is Dirty
2007-03-03 11:51:01 So I found out today from Paul that wordpress.org got hackedwordpress.org got hacked and their new 2.1.1 release is tainted. Yes, I said tainted. Someone hacker got down and dirty with the wordpress.org servers and altered the code in the new 2.1.1 release that apparently allows for a remote PHP file execution…then bundled it up for everyone to download and infect their servers with. So now this means that I have to back up my site, disable my 20-some wordpress plugins, delete my files, download the new version, put the files back in place, then watch as my life slowly fades away. Damn Paul for paying attention to the tidbits of info the wp-admin dashboard. Read the full article here To my fellow bloggers, please upgrade your upgrade your Word press installation to v2.1.2. Ahhhh, now doesn’t that feel better? More About: Press , Dirty , Dirt
Christina Aguilera Might be Crazy
2007-02-27 05:46:01 I don’t really know if I like it or not…I mean, the song has a little jingle to it, but it’s not something I would rock to in my car with the windows down where people can hear it. I’m liking the three Chris t ina’s though, since she’s one of the people on my PHF list. See her new video “Candyman” below. More About: Christina Aguilera , Crazy , Tina
How to Install PHP6
2007-02-26 11:44:01 This was a little experiment gone somewhat wrong, when I tried to upgrade my VPS to PHP6. I swear it worked, but I should have known that nothing works on it — Wordpress just crapped out a bunch of errors. On a higher note though, it seems to be hella secure as you can no longer use magic quotes or globals, otherwise Apache will fail. So if you really want to be on the bleeding edge, here’s how you install PHP6: I didn’t really need to install a whole bunch of stuff, but depending on how your webserver is already set up you may need to install extra dependencies, but this will become obvious during the compile. 1) Make sure your autoconf version is up to date with version 2.13 or higher: autoconf -V 2) Install ICU…you can find your version here. wget ftp://ftp.software.ibm.com/software/globa lization/icu/3.6/icu4c-3_6-src.tgz tar -xzvf icu4c-3_6-src.tgz cd icu*/source mkdir /usr/local/icu ./configure --prefix=/usr/local/icu && make && mak... More About: How To , Php , Tall
I?m So Smart
2007-02-25 23:43:02 So I learned today that electric can openers have little magnets in the top that apparently hold on to the lid while the can is being opened. And get this — apparently you’re supposed to take the stuff out of the can before you put it in the microwave because I guess metal and microwaves don’t go together. I wonder why they don’t put this kind of stuff of the labels. I mean, good thing I’m a genious and I figured that out before I could have killed myself. More About: Smart , Mart
Modx Makes Me Drool
2007-02-25 23:43:02 I never thought I’d say that about a CMS, but then again I said the same thing about Scott and look what happened there. Anywho, one of my friends showed me this new CMS that is purely Ajax on PHP, and I decided to give it a whirl. I might even switch my site over once I figure out how it works. See it here. More About: Make
Script Kiddy Killjoy
2007-02-25 23:43:02 If your site has ever been hacked, it will have most likely showed up in the zone-h database. This is the site where all the little script kiddies get together to brag about their “hacking” skills and such. Basically, whenever they deface a site they report it to zone-h, who then check to make sure they aren’t full of shizit. Well, in efforts to keep the script-kiddies from getting credit, I’ve devised discovered a way to make sure that zone-h’s bots can’t check the submissions. All you have to do is add this to your root .htaccess file: <Files 403.shtml> order allow,deny allow from all </Files> # zone-h deny from .zone-h.org deny from .zone-h.com deny from 213.219.122. # cyber-warrior.org deny from .cyber-warrior.org deny from .cyber-security.org deny from 80.237.211.8 More About: Script , Kill , Kidd
The Basic MySQL Injection
2007-02-25 23:43:02 Ahhhh the classic hack that doesn’t work anymore… which is why I’m posting it here. I always thought it was kind of an interesting concept but no one ever made it simple for me, so I shall post it here. How to do a simple MySQL Injection Ok, so this is your basic PHP login script that asks for your username and password, which would then query the database to authenticate you: $user = $_POST[”username”]; $pass = $_POST[”password”]; $query = mysql_query(”SELECT * FROM users WHERE user=’$user’ AND password=’$password’”); $rows = mysql_fetch_row($query); if ($rows == 0) { die (’Login Incorrect!’); } Assuming that register_globals are enabled on the server, this script will work and in return use the POST variable to query the database for an already-defined row to see if both conditions are being met, which are obviously the username/password fields. If the input does not meet this requirement,... More About: Basic , Mysql
Messing with PHP and MySQL
2007-02-25 23:43:02 This just a simple tutorial on how to connect to MySQL with PHP, as well as using a MySQL query to create simple database. The first thing you would want to do is create the database so PHP can access it. My preferred method is through phpMyAdmin or cPanel (if your host provides this)…or you can run a simple query via MySQL command line: CREATE DATABASE `liquor`; USE `liquor`; CREATE TABLE `brands` ( `id` int UNIQUE NOT NULL, `brand` varchar(40), `type` varchar(50), PRIMARY KEY(id) ); INSERT INTO cars VALUES(1,'skyy','vodka'); INSERT INTO cars VALUES(2,'cpt. morgan','rum'); INSERT INTO cars VALUES(3,'ice 101','schnapps'); This code will basically create a database named “liquor” with the table “brands” that lists three of my favorite liquors in order with the type of liquor that they are. From here, you’ll want to create a database user and add it to the database with the appropriate privileges. You can usually do this in your MySQL... More About: Php , With , Messi , Mysql , Sing
Radiant CMS is Gorgeous
2007-02-25 23:43:02 If you haven’t heard the news, Radiant CMS is finally making its presence on the internet. Of course, you wouldn’t have heard the news unless you’re a dork like me. Anyways, I thought it would be worth mentioning as this is probably one of the sexiest content management systems I’ve seen yet. But really, I just like the color. And the logo’s nice too. Check out Chris and Luke’s sites, which are currently running Radiant with Ruby on Rails. More About: Gorge , Dian , Gorgeous , Adia
How to Make a Sexy Tag Cloud with PHP and MySQL
2007-02-25 23:43:02 Well it seems that everyone has one, and I’d have to admit that a tag cloud is a good way to spice up your site a little bit. I first thought of this when setting up a friend’s site… he wasn’t using a CMS like Wordpress or anything that I could find a quick tag cloud plugin for, so I figured I could probably just make my own. Well, I did and now I shall share it. This tutorial will show you how to set up a simple tag cloud using PHP and MySQL, with a little bit of Ajax effects Before we get started, take a quick look at the sample cloud. (more…) More About: How To , Php , With , Sexy , Mysql
Setting up an Access Log with PHP
2007-02-25 23:43:02 I set this up back in July when my site was hosted with H-Insiders and I didn’t have direct access to my Apache logs. I figured that I could do this myself with a few basic PHP functions, and by doing so I was able to set up my own access log in a static text file that I could download whenever I wanted. This first example is to log unique visitors to your site as well as gather some important information about them. Here is the code: <?php session_start(); if(!session_is_registered('counted')){ $agent = $_SERVER['HTTP_USER_AGENT']; $uri = $_SERVER['REQUEST_URI']; $user = $_SERVER['PHP_AUTH_USER']; $ip = $_SERVER['REMOTE_ADDR']; $ref = $_SERVER['HTTP_REFERER']; $dtime = date('r'); if($ref == ""){ $ref = "None"; } if($user == ""){ $user = "None"; } $entry_line = "$dtime - IP: $ip | Agent: $agent | URL: $uri | Referrer: $ref | Username: $user n"; $fp = fopen("access_log.txt", "a"); fputs($fp, $entry_line); fclose($fp); session_register('counted'); } ?&... More About: Php , With , Access
Hotlink Block
2007-02-25 23:43:02 So I finally figured out what caused the huge bandwidth spike on my site last month. Seems some idiot was hotlinking my MP3s and old images from the Jukebox and gallery on my previous site…I guess he’s out of luck now that they’re gone. Anywho, for those who don’t have the luxury of cPanel, here’s a simple Apache rewrite to keep people from jacking your images and stuff: RewriteEngine on RewriteCond %{HTTP_REFERER} . RewriteCond %{HTTP_REFERER} !^http://(www.)?site.com [NC] RewriteRule .(jpe?g|gif|png|bmp|mp3)$ - [NC,F] More About: Link , Bloc , Block , Lock
Installing Ruby on cPanel
More articles from this author:2007-02-25 23:43:02 Here’s how to install Ruby on Rails on a cPane l system: First install Ruby: wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8 .5-p12.tar.gz tar -xvzf ruby-1.8.5-p12.tar.gz cd ruby-1.8.5-p12 ./configure make make install Now, install the Gems and Rails: wget http://rubyforge.org/frs/download.php/112 89/rubygems-0.9.0.tgz tar -xvzf rubygems-0.9.0.tgz cd rubygems-0.9.0 ruby setup.rb gem install rails Install Fast CGI wget fastcgi.com/dist/fcgi-2.4.0.tar.gz tar -xvzf fcgi-2.4.0.tar.gz cd fcgi-2.4.0 ./configure make make install wget fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz tar -xvzf mod_fastcgi-2.4.2.tar.gz cd mod_fastcgi-2.4.2 /usr/local/apache/bin/apxs -o mod_fastcgi.so -c *.c /usr/local/apache/bin/apxs -i -a -n fastcgi mod_fastcgi.so gem install fcgi Edit the Apache config file and add the fcgi module: pico /usr/local/apache/conf/httpd.conf LoadModule fastcgi_module libexec/mod_fastcgi.so FastCgiIpcDir /tmp/fcgi_ipc/ AddHandler fastcgi-script .fcgi Then restart Apache Install RMa... More About: Alli , Panel , Tall 1, 2, 3, 4 |




