Month: January 2010

Download: XChat Popup Menu (Works with Hexchat too)

For any/all who constantly use the right click popup menu, I  have a very powerful one I wanted to share.

Requires Hexchat or Xchat

Make sure you you have done the command below for proper ban control.

/set irc_ban_type 1

Save this as popup.conf 

 

(Replace xchat below with hexchat or vice versa if you are using a different app)

Linux:
Copy popup.conf to:
/home/$user/.hexchat/

Windows XP
Copy popup.conf to:
C:\Documents And Settings\$user\Application Data\Hexchat\
Windows Vista /7/8
Copy popup.conf to:
C:\Users\$user\AppData\Roaming\Hexchat

Enjoy!

How to Make a URL Shortener Site with YOURLS and Drupal

YOURLS is a simple and easy to use URL shortener, but leaves much needed when it comes to page layout and usefulness as compared to a Content Management System.

For this reason, I believe that Drupal is great for being used in combination with YOURLS.

Setting Up YOURLS

  1. Unzip the YOURLS archive
  2. Copy includes/config-sample.php to includes/config.php
  3. Open includes/config.php with a raw text editor (like Notepad) and fill in the required settings
  4. Upload the unzipped files to your domain public_html or www folder
  5. Create a new database (see Configuration – you can also use an existing one)
  6. Point your browser to http://yoursite.com/admin/

Installing Drupal in a subdirectory

  1. http://drupal.org/requirements
  2. Download Drupal
  3. Extract
  4. Upload it to a subdirectory, such as /content or /pages
  5. Grant write permissions on the configuration file
  6. Create the database
  7. Run the install script
  8. Clean URLs

Drupal + YOURLS

Now that you have them both installed, add the following to your .htaccess

DirectoryIndex content

replace content with the name of the subdirectory you used.

Rename /sample-public-front-page.php to something like url.php

Go to your drupal install, login, and go to /subdomain/node/add/page

Create a new page titled URL, make sure to select PHP as the Input Format, and insert the following code

<?php
require_once( dirname(__FILE__).’/includes/load-yourls.php’ );

// Part to be executed if FORM has been submitted
if ( isset($_REQUEST[‘url’]) ) {

$url = $_REQUEST[‘url’];
$keyword = isset( $_REQUEST[‘keyword’] ) ? $_REQUEST[‘keyword’] : ” ;

$return = yourls_add_new_link( $url, $keyword );

$shorturl = $return[‘shorturl’];
$message = $return[‘message’];

echo <<<RESULT
<h2>URL has been shortened</h2>
<p>Original URL: <code><a href=”$url”>$url</a></code></p>
<p>Short URL: <code><a href=”$shorturl”>$shorturl</a></code></p>
<p>$message</p>
RESULT;

<?php yourls_share_box( $url, $shorturl ); ?>

} else {

echo <<<HTML
<h2>Enter a new URL to shorten</h2>
<form method=”post” action=””>
<p><label>URL: <input type=”text” name=”url” value=”http://” size=”50″ /></label></p>
<p><label>Optional custom keyword: <input type=”text” name=”keyword” size=”5″ /></label></p>
<p><input type=”submit” value=”Shorten” /></p>
</form>
HTML;

}

?>

Now publish it as sticky to the front page.

That’s it!

Now of course there will be lots of things you need to customize, and make look nice, and maybe some things I forgot. But remember, Google is your friend.

Really Cool Portable Apps UPDATE

I originally posted this in 2008, while running a crappy dell machine, and therefore I was using all sorts of portable apps. However I still believe it useful to a lot of people, so, here you go!

1. Firefox
Easily the most powerful open source browser is also availible in portable form. You can even save your bookmarks, addons, and history right to the usb.
Download

2. NVU Portable
Easy Html coding on the road with NVU. Whenever I need to code something in HTML really quickly. Download

3. GIMP Portable
Open Source Photoshop-like program. Portable edition helps so you don’t have to install all the stuff on your computer
Download
4. Filezilla
My FTP client of choice. Runs fast and allows you to upload on the fly.
Download
5. VLC
Great program for watching a lot of Video and Audio formats.
Download
6. Open Office
Similar to Microsoft Word, this document editor has much functionality
Download
7. 7-Zip
Unzips many file formats, such as RAR and ZIP
Download
8. Foxit Reader
Instead of using Adobe’s slow and junky PDF reader, use this free one thats fast.
Download
9. Miranda IM
Instant Messaging Program that works with AIM, Jabber, ICQ, IRC, MSN, Yahoo, Gadu-Gadu and more.
Download
10.  Double Killer
A simple program that scans your hard drive for duplicates.
Download

Bonus: Learn how to Put Windows, Mac, and Linux on a usb stick.

(Original Post)