Archive for the 'internet' Category

About a year ago my lady picked up a book called Chicago’s Best Dive Bars: Drinking and Diving in the Windy City written by Jonathan Stockton. From time to time I pick up the book when I’m in a mood to find a cool bar as an alternative to the standards that I frequent in Lakeview and Lincoln Park. I’ve been to some of them and if I am lucky enough I will be able to hit up all of them on the list some day.

Published by IG Publishing in Brooklyn the book is described by IG Publishing as:

Chicago’s Best Dive Bars features opinionated reviews of over 90 of the grungiest and grittiest drinking establishments in the Windy City. If you want to avoid the tourist traps listed in those “other” bar guides and find out where the “real” people do their drinking, then Chicago’s Best Dive Bars, like its New York and San Francisco predecessors, is the drinking person’s guide to the delightfully filthy underside of Chicago bar life.

Continue on to the dive bar map.

Whats up? Url rewriting is a pretty cool thing to have. [especially when people ask you for it] There’s a lot of requests by people who want to implement full on url rewriting or extension less urls in SharePoint 2007. After messing around for a little bit it, I came up with a good way to do it. When I was looking for examples on the web there were a lot of people saying that it couldnt be done. I thought, wtf, serial? But in the end it actually didn’t take much to implement it. Here’s an HttpModule that I wrote to do the work.

The key pieces are the this.app.BeginRequest += new EventHandler(app_BeginRequest) which
steps in front of the request and allows the module to get its redirect on.

And HttpContext.Current.RewritePath(redirect, false); will push the necessary headers n such forward so that the receiving .aspx page will understand how to correctly post back.

using System;
using System.Data;
using System.Data.SqlClient;
using System.Reflection;
using System.Collections;
using System.Text;
using System.Web;
using System.Web.Caching;
using System.Web.SessionState;
using System.Security.Cryptography;
using System.Configuration;
using System.Threading;
using System.IO;
using System.Security;
using System.Security.Principal;

namespace ScaredPanda
{
    public sealed class RewriteHttpModule : IHttpModule
    {
        HttpApplication app = null;
        ///
        /// Initializes the httpmodule
        ///
        public void Init(HttpApplication httpapp)
        {
            this.app = httpapp;
            this.app.BeginRequest += new EventHandler(app_BeginRequest);
        }

        public void app_BeginRequest(Object s, EventArgs e)
        {
            try
            {
		//determine if the income request is a url that we wish to rewrite.
		//in this case we are looking for an extension-less request
                string url = HttpContext.Current.Request.RawUrl.Trim();
                if (url != string.Empty
                    && url != "/"
                    && !url.EndsWith("/pages")
                    && !url.Contains(".aspx")
                    && url.IndexOf("/", 1) == -1)
                {
                    //this will build out the the new url that the user is redirected
                    //to ie pandas.aspx?pandaID=123
                    string redirect = ReturnRedirectUrl(url.Replace("/", ""));

		    //if you do a HttpContext.Current.RewritePath without the 'false' parameter,
                    //the receiving sharepoint page will not handle post backs correctly
		    //this is extremely useful in situations where users/admins will be doing a
                   //'site actions'  event
                   HttpContext.Current.RewritePath(redirect, false);
                }
            }
            catch (Exception ex)
            {
                //rubbish
            }
        }
    }
}

There are some new trance mixes that we have been listening to lately from AH.FM, DreamensioN and Johan Nilsson aka DJ Irish. Some of the best trance that we have heard lately is coming from AH.FM and the mixes that DreamensioN is putting out there. Here are the links to the newest sets that these guys have put out.

DreamensioN - Bedroom Sessions 10 (4 Disc Set)

(Disc 1 of 4 - The Best of Bedroom Sessions Disc 1)

01 - Whiteroom - The White Room ( Jump The Next Train Scott Bond Vs XDR Intro Mix )
02 - Airwave feat Jon O Bir - The Promise I Made (Digital Mix)  [Bonzai Trance Progressive]
03 - Lustral - Everytime (Nalin and Kane remix)  [Hooj Choons]
04 - Cass & Slide - Perception (Vocal mix)  [DanceNet]
05 - Solarstone feat Elizabeth Fields - Speak in Sympathy (Original Mix)  [Deepblue Records]
06 - Placebo vs Timo Maas - Special K (Timo Maas Mix)  [Virgin Records America]
07 - Markus Schulz feat. Departure - Without You Near (Coldharbour Mix)  [Coldharbour Records]
08 - Max Graham feat. Jessica Jacobs - I Know You’re Gone (Original Mix)  [Shinemusic]
09 - Keenan and Dale Anderson - Drift Away (Original Mix)  [SOG CHROME]
10 - PQM feat Chronik - Over The Edge (Andrew Bennett mix)  [Coldharbour Records]
11 - Yamin feat Marcie - Blanket of White (Original Vox mix)  [Abora Recordings]
12 - Motorcycle - As The Rush Comes (Gabriel and Dresden Sweeping Strings Mix)  [Positiva]

(Disc 2 of 4 - The Best of Bedroom Sessions Disc 2)

01 - Scott Bond vs Solar Stone - 3rd Earth (Intro Mix)  [Made In England]
02 - Hemstock & Jennings - Mirage (Of Hope) (Original Mix)  [Five AM Records]
03 - Matt Darey feat. Izzy - Eternity (Alex M.O.R.P.H. remix)  [Darey Products]
04 - Zirenz - Edge of Space (Whiteroom remix)  [Mondo Records]
05 - Lost Tribe - Gamemaster (Lost Tribe 99 mix)  [Hooj Choons]
06 - Max Graham vs Yes - Owner of a Lonely Heart (Movement One remix)  [Data Records]
07 - Schiller - Das Glockenspiel (DJ Tiesto remix)  [Data Records]
08 - Gabriel & Dresden - Tracking Treasure Down (Nick Thompson Remix)
09 - Armin Van Buuren - Shivers (Alex M.O.R.P.H. Remix)  [Ultra Records]
10 - Oceanlab feat. Justine Suissa - Satellite (Above & Beyond Original Mix)  [Armada Records]
11 - Above and Beyond - Alone Tonight (Above and Beyond club mix)  [Anjunabeats]
12 - Paul Van Dyk feat Wayne Jackson - The Other Side (Original mix)  [Positiva]

(Disc 3 of 4 - Bedroom Sessions 10 Disc 1)

01 - Orkidea vs Marc Mitchell - Eternal Love  [Ava Recordings]
02 - Solarstone and Alucard - Late Summer Fields (Deeper Sunrise mix)  [Solaris Recordings]
03 - Mike Foyle - Pandora (The Blizzard remix)  [Armind]
04 - Dash Berlin vs Mark Sherry vs Terry Ferminal - Till The Sky Walks Away (Darkmemoria Mashup)
05 - Lange and Gareth Emery vs Jimmy Vallance - Another You Need Me (LauraK mashup)
06 - Tilt - Angry Skies (Vadim Soloviev mix)  [Lost Language]
07 - Santiago Nino and Damien Heck feat Antonia Lucas - Red Sky (Duderstadt progressive dub mix)  [Vandit Records]
08 - Markus Schulz vs Andy Moor - Daydream (12 inch mix)  [Armada Music]
09 - Markus Schulz feat. Dauby - Perfect (Agnelli & Nelson remix)  [Coldharbour Recordings]
10 - DJ REM feat. Shakeh - I’m Alive (Original Mix)  [Boiler House Records]
11 - Fragma - Toca Me (Inpetto 2008 remix)  [Tiger Records]
12 - Armin van Buuren and DJ Shah feat Chris Jones - Going Wrong (Amin van Buurens Universal Religion remix)  [Armada Music Holland]

(Disc 4 of 4 - Bedroom Sessions 10 Disc 2)

01 - The Blizzard - Kalopsia (Original Intro Mix)  [Armind]
02 - Super8 and DJ Tab - Suru (Original mix)  [Anjunabeats]
03 - The Doppler Effect - Beauty Hides in the Deep (John O’callaghan remix)  [Armada Music Holland]
04 - Sunlounger feat Zara - Crawling (DJ Shah rework)  [Soundpiercing]
05 - Luminary - Amsterdam (Super8 and Tab remix)  [Anjunabeats]
06 - Armin van Buuren feat. Racoon - Love You More (Vocal mix)  [Armada]
07 - DJ Shog - (Feel Me) Through the Radio (Duderstadt uplifting remix)  [Drizzly Records]
08 - Vadim Soloviev feat Marcie - Stay with Me (Genix remix)  [Motion Music]
09 - Oceanlab - Sirens of the Sea (Above and Beyond club mix)  [Anjunabeats]
10 - Way Out West - The Fall (Richard Durand remix)  [Black Hole Recordings]
11 - Global Experience - Madras  [Songbird]
12 - Sunlounger - In and Out (DJ Shah rework)  [A State Of Trance]
13 - DreamensioN - Outtro

Download the set - DreamensioN - Bedroom Sessions 10 (4 Disc Set)

Afterhours.FM 2yr Anniversary Celebration (mixed by DreamensioN)

01 - AD Finem - Angel (XDR presents ‘Galaxia’ Ferry Corsten intro mix)
02 - Aly and Fila vs FKN feat Jahala - How Long (Kris Oneil remix)  [Soundpiercing]
03 - Fragma - Tocas Miracle (Inpetto 2008 remix)  [Tiger Records]
04 - Mat Zo - Out of Minority (Original mix)  [Coldharbour Recordings]
05 - Mandala Brothers - Sleepwalking (Duderstadt remix)  [Mandala Beatz]
06 - Purple Mood - One Night in Tokyo (DJ Shah’s Savannah mix)  [Anjunabeats]
07 - DJ Tatana - Silence (Extended Mix)  [Sirup Records]
08 - Adam White feat Martin Gretch - Ballerina 2007 (Nat Monday remix)  [Emalodic]
09 - Mellomaniacs - Solarcoaster (DJ Shah remix)  [Shah Music Digital]
10 - Destination X - Dangerous (Gareth Emery remix)  [Lyon Echo Records]

Download the set - AH.FM 2yr Anniversary Celebration Mix

Johan Nilsson - Assorted Hard Trance Vol. 12

01. Fei-Fei - Hangar One - CD-r
02. Kidd Kaos & Konflict - Logical Contrast - Trancefuzion
03. SBS Project & Mind Design Feat Lizzie Curious - In Mode (Indecent Noise Banging Tech Mix) - Communicate
04. Odysee Of Noise vs Alici Project - Fire Code (Johan Nilsson Mash-Up)
05. Loki - Nocturnal (DJ H2O + AutoImmune Mix) - Pro State
06. Orbital Frame - Neith (Original Mix) - Communicate
07. Armored Core - Voices In My Head (Original Mix)
08. Ben Fraser - Zero Tolerance - Sabretooth
09. The Projector - Rave Machine (FJ Project Mix) - German Trance
10. Phil York - Lead By Example (Vandall Remix) - Hardtimez
11. Aethna - Enigma (Dave202 Mix) - Thrust Groove
12. Skysurfer - Colors 2008 (Russenmafia Mix) - [Hindsight]

Download the set - Johan Nilsson - Assorted Hard Trance Vol. 12

We have been creating multiple MOSS2K7 sites in our development environment and then moving them up to production servers, as you usually do in this game. Instead of creating them by hand I have been using the stsadm.exe -o backup/restore functionality which works bichenly. But, there are a few problems that I have run into. Part of the problem when using the backup/restore functionality is that SharePoint page layouts hold onto the old server information. After doing a successful restore of one of my MOSS2K7 site I tried to edit the page settings through the Page — Edit Page Settings link when I got the error “Value does not fall within the expected range”. This problem is because the newly restored site is holding onto an old site definition and is unable to find the old site def. If you look at the page layout through the Content Structure page you can see the old server referenced. A while ago I came across some code that fixes this issue. However I can’t for the life of me find where the hell I found it. So if you recognize some of the variable names let me know so I can give you some credit. The code wasn’t written as a web part but as a command line utility, so for those who don’t have access to the server this code wasn’t much of use. So czech out the web part that I created, drop this onto your page and the part loops through all the sites and subsites in your site and it fixes up the layout urls.

*Note that if you are running this code from the web part that the code must be run using the SPSecurity.CodeToRunElevated objects. If the code is not run with elevated privileges you will receive an “access” error.

using System;
using System.Text;
using System.ComponentModel;
using System.Collections.Generic;
using System.Security.Permissions;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.Design.WebControls;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Security;
using Microsoft.SharePoint.Publishing;
namespace ScaredPanda.Web.UI.WebControls.WebParts
{
    public class FixLayoutUrls : System.Web.UI.WebControls.WebParts.WebPart
    {

        protected override void CreateChildControls()
        {
            SPSecurity.CodeToRunElevated ElevatedCode = new SPSecurity.CodeToRunElevated(CodeToRunElevated);
            SPSecurity.RunWithElevatedPrivileges(ElevatedCode);

            base.CreateChildControls();
        }

        protected void CodeToRunElevated()
        {
            try
            {
                using (SPSite oSite = new SPSite(SPContext.Current.Web.Url))
                {
                    Context.Response.Write(oSite.RootWeb.Url);
                    FixPages(oSite.RootWeb);
                }

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        private void FixPages(SPWeb oWeb)
        {
            try
            {
                if (!PublishingWeb.IsPublishingWeb(oWeb)) return;

                PublishingWeb pw = PublishingWeb.GetPublishingWeb(oWeb);
                SPListItemCollection oList = pw.PagesList.Items;

                string sSiteUrl = oWeb.Site.Url;
                oWeb.AllowUnsafeUpdates = true;
                this.Context.Response.Write("Processing " + oWeb.Title + "(" + oList.Count.ToString() + " pages)...");

                foreach (SPListItem oPageItem in oList)
                {
                    string s = (string)oPageItem[FieldId.PageLayout];
                    if (s != null && !s.StartsWith(sSiteUrl))
                    {
                        this.Context.Response.Write(”Fixing ” + oPageItem.Title + ” (” + oPageItem.Url + “)”);
                        oPageItem[FieldId.PageLayout] = sSiteUrl + s.Substring(s.IndexOf(”/”, 9));
                        oPageItem.SystemUpdate();
                    }
                }

                foreach (SPWeb oSubWeb in oWeb.Webs)
                {
                    FixPages(oSubWeb);
                    oSubWeb.Dispose();
                }
            }
            catch (Exception ex)
            {
                this.Context.Response.Write(”Layout fix failed at site: ” + oWeb.Title + “”);
                this.Context.Response.Write(ex);
            }
        }
    }
}
    Tere! Scrrd panda - a place for my friends and family to see what i'm up to; and an occasional code post.
  • 89.3 The Current

  • recently written

  • categories

  • Archive