February 22nd, 2011

When you’re young, you look at television and think, There’s a conspiracy. The networks have conspired to dumb us down. But when you get a little older, you realize that’s not true. The networks are in business to give people exactly what they want. That’s a far more depressing thought. Conspiracy is optimistic! You can shoot the bastards! We can have a revolution! But the networks are really in business to give people what they want. It’s the truth

http://en.wikiquote.org/wiki/Steve_Jobs

Regex for URLs

February 22nd, 2011
Regex: (https?://)?(\w+\.)+\w{2,4}(/[\w./?:~+\-\\\[\]\*#%&=]*)?
Forklaring:
(https?://)? http eller https eller intet.
* (\w+\.)+ ord, tal, underscore efterfulgt af punktum (selve domænet) repeteret én eller flere gange
* \w{2,4} ord, tal, underscore (TLD) på 2-4 tegn
* ((/[\w./?:~+\-\\\[\]\*#%&=]*)? ord, tal, underscore, punktum (evt. subdomæner, url-parametre). / ? : ~ + – \ [ ] * # % & = ]* er de tegn, der er tilladt.

Backup and Restore MSSQL 2008 R2 on MSSQL 2008

August 3rd, 2010

See this post: http://serverfault.com/questions/149314/cant-restore-backup-from-sql-server-2008-r2-to-sql-server-2005-or-2008

Scripting is the way. Go to Tasks -> Generate Scripts. Click advanced and be sure to select SQL 2008 and Data Only or Schema and Data. Run the generated script on the older server version.

Install Drupal on Surftown

July 23rd, 2010

SAFE-MODE is in effect when using Surftown and there is no way to switch it off.

You need to create the folder required by the installation yourself and CHMOD them to 777. Also do this for these two folders:

  • /sites/default/files/languages/tmp
  • /sites/default/files/languages/languages

iFolder: Install OpenSUSE in VirtualBox with Guest Additions

July 13th, 2010

http://www.liberiangeek.net/2010/02/how-to-install-guest-additions-software-in-opensuse-client/

Flash – Javascript communication

April 27th, 2010

Important: IE uses the id to grab the flash movie, all other browsers use the name.

SOURCE: http://www.actionscript.org/resources/articles/638/1/Basics-of-using-the-ExternalInterface/Page1.html

Javascript:

function onChange( str:String ){

// handle call from outside flash

}

// tells it the property in JS, the scope, and the return function to call

ExternalInterface.addCallback( “onChange”, this, onChange );

onMouseDown = function(){

ExternalInterface.call(“general_JS_call”, “String to return to Flash:”);

// calling the function name first, arguments of the function following

}

HTML:

<html>

<head>

<title>Test</title>

</head>

<body onload=’getID(“catalogue”);’>

<script type=”text/javascript”>

var me;

function getID(swfID) {

if (navigator.appName.indexOf(“Microsoft”) != -1) {

me = window[swfID];

} else {

me = document[swfID];

}

}

function js_to_as(str) {

me.onChange(str); //function name equal to the callback defined in actionscript

}

function general_JS_call(str) {

//react to call from actionscript

}

</script>

<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://macromedia.com/cabs/swflash.cab#version=4,0,0,0″

id=”swf_name” width=”1398″ height=”636″>

<param name=”movie” value=”swf_name.swf” />

<param name=”FlashVars” value=”" />

<param name=”quality” value=”medium” />

<param name=”bgcolor” value=”#99CC33″ />

<embed src=”swf_name.swf” flashvars=”" bgcolor=”#99CC33″ width=”1398″

height=”636″ type=”application/x-shockwave-flash” name=’swf_name’>

</embed>

</object>

<input type=”button” value=”Pass to AS” onclick=”js_to_as(‘Test value to send to AS’);”>

</body>

</html>

Install Umbraco on server

April 23rd, 2010

http://jovall.net/surftowntipps/how_to_umbraco.html

Run and debug PHP with Eclipse, Apache and MySQL

February 9th, 2010
  1. Eclipse
  2. Apache, PHP and MySQL
    Link #1
    Link #2
  3. Zend Debugger
    Link #1
  4. SSL
    Link #1
    Link #2
  5. phpMyAdmin
    Enabling relation view

Install Windows 7 from USB on UL30A

December 28th, 2009

Plug in the bootable USB stick.

Power on your UL30A and press ESC to select boot device. Choose the USB stick, and the installation will initialize.

MS has a utility which simplifies the process of making a bootable USB stick: http://store.microsoft.com/Help/ISO-Tool.

If you are installing x64 you need to make the bootable USB device manually, because the MS utility is unable to use the bootloader from a 64 bit Windows 7 disc/ISO. Follow these instructions instead.

If you encounter a strange message telling you to supply a driver that the installation can’t find, you need to go to asus.com and download the ATKACPI driver for the harddrive controller or enter BIOS and change the IDE-controller mode to AHCI. See this post for a discussion on the issue.

How to flash Linksys WAP54G with dd-wrt

June 5th, 2009

The information found here is inspired from http://wap54g.corpcomp.co.nz/ and dd-wrt

Prerequisites: WAP54G has original Linksys firmware running.

  1. Note the hardware version of the router.
  2. Visit dd-wrt and download the corresponding firmware for your router.
  3. Go to TCP/IP settings and change your IP to 192.168.1.240/255.255.255.0
  4. Access the router from 192.168.1.245
  5. Reset the router to factory settings.
  6. Use username admin and a blank password to login to the router.
  7. Flash the router with the dd-wrt firmware according to the guidelines found on http://www.dd-wrt.com/dd-wrtv3/index.php
  8. Un- and replug the powerchord.
  9. Access the router from 192.168.1.1 and configure it.