My old startup (I worked at PayScale from 2005-2009) just released a new feature exposing the breadth of data they’ve acquired over the past few years.
Judging by this chart, Seattle seems to have weathered the recession much better than the rest of the nation.
Nice work guys!
| The PayScale Index uses 2006 average total cash compensation as a baseline. |
|
Being a .NET developer by trade, I’ve got several web applications written in ASP.NET that I’d like to host. Currently, I have hosting with Rackspace Cloud, and pay per hour based on the resources I’m allocating. I toyed with deploying a 2nd VM running windows, but the price was a bit steep for the kind of hobbyist activities I’m doing here. I figured I’d check to see how ASP.NET hosting on Apache has evolved over the years. I’ve concluded that it seems like it’s fairly stable now, and relatively easy to get running. This tutorial will help you deploy virtual hosting with mod_mono on Ubuntu 10.04 LTS.
Firstly, you’ll need to install mod_mono
$ sudo apt-get install mod_mono
Next, enable mod_mono
$ sudo a2enmod mod_monoWe’ll need to change the default index a bit to match up more closely with an IIS environment.
You’ll need to edit /etc/apache2/mods-enabled/mod_mono.conf
Change this (Line 2):
DirectoryIndex index.aspx
To this:
DirectoryIndex Default.aspx index.aspx
Next, we create our site.
Edit /etc/apache2/sites-available/YOUR-SITE-URL and use the following template:
Note: Replace YOUR-SITE-URL and /var/www/mysite with values appropriate for your configuration
<VirtualHost *:80> ServerName YOUR-SITE-URL DocumentRoot /var/www/mysite/ MonoDocumentRootDir "/var/www/mysite" MonoServerPath monosite "/usr/bin/mod-mono-server2" MonoApplications monosite "/:/var/www/mysite" <Directory /var/www/mysite/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all MonoSetServerAlias monosite SetHandler mono </Directory> </VirtualHost>
Next, you’ll need to enable the site and reload Apache:
Note: Replace YOUR-SITE-URL with the same value you used above
$ sudo a2ensite YOUR-SITE-URL $ sudo /etc/init.d/apache2 reload
Next, we’ll test it out.
Edit /var/www/YOUR-SITE-URL/Default.aspx and paste the following:
Note: Replace YOUR-SITE-URL with the same value you used above
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>ASP Test Page</title> </head> <body> <form id="form1" runat="server"> <asp:label id="lbl1" runat="server">ASP Test Page</asp:label> </form> </body> </html>
Now visit your site in your browser. http://YOUR-SITE-URL
It should be working at this point.
Good luck!
I run mindtouch as my wiki software. It’s been a great piece of software, and I will continue running it until I can find something better. Recently, I’ve been working to overhaul all the bsd.bz sites, and bring them under one umbrella (same theme, unified header). In an effort to better develop changes to the wiki’s theme, I need to run that software locally on my dev machine (my macbook pro).
So, without further delay, this is how I got MindTouch Core v.9.12.2 installed under Snow Leopard (OSX 10.6).
This tutorial assumes you already have PHP & Apache working.
First, we’ll need to install some pre-requisite software. I’ve included direct links the the current versions of the software for your convenience. I make no guarantee these links will work in the future, but have included links to the respective download location.
Mac Ports (Currently 1.8.2) – [ Direct DL ]
MySQL (Currently 5.1.47) – [ Direct DL (Intel x86_64) ]
Mono (Currently 2.6.4) – [ Direct DL (Intel) ]
Update your hosts file.
I use wiki.localdomain so I can add other name based virtual hosts and have my mini-production replica on my dev machine. ie blog.localdomain, wiki.localdomain, etc
Open up /etc/hosts in your favorite editor (I use vi)
$ sudo vi /etc/hosts
Add this line:
127.0.0.1 wiki.localdomain
Next, we’ll need to install the pre-requisites required to run Mindtouch, and html2ps
$ sudo port selfupdate $ sudo port sync $ sudo port install ImageMagick $ sudo port install clucene $ sudo port install p5-libwww-perl $ sudo port install texlive $ sudo port install netpbm $ sudo port install wget
Now, we have enough to install html2ps. Run the installer, and choose “/opt/local” for the install path:
$ cd ~/Downloads $ wget http://user.it.uu.se/~jan/html2ps-1.0b5.tar.gz $ tar -xzf html2ps-1.0b5.tar.gz $ cd html2ps-1.0b5 $ sudo ./install
Next, download and install Mindtouch:
$ cd ~/Downloads $ wget http://s3.amazonaws.com/mindtouch/MindTouch_Core_9.12.2_Source.tar.gz $ tar xfvz MindTouch_Core_9.12.2_Source.tar.gz $ cd MindTouch_Core_9.12.2_Source $ mkdir ~/Sites/wiki.localdomain $ cp -r web/* ~/Sites/wiki.localdomain/ $ chmod a+w ~/Sites/wiki.localdomain/config/
Now, add a virtualhost to httpd.conf or an included vhosts config:
<VirtualHost *:80> ServerName wiki.localdomain DocumentRoot "/Users/YOUR-USERNAME-HERE/Sites/wiki.localdomain" RewriteEngine On RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^/$ /index.php?title= [L,NE] RewriteCond %{REQUEST_URI} ^/@gui/[^.]+$ RewriteRule ^/@gui/(.*)$ /proxy.php?path=$1 [L,QSA,NE] RewriteCond %{REQUEST_URI} !^/(@api|editor|skins|config|@gui)/ RewriteCond %{REQUEST_URI} !^/index\.php RewriteCond %{REQUEST_URI} !^/favicon\.ico$ RewriteCond %{REQUEST_URI} !^/robots\.txt$ RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE] # deki-api uses encoded slashes in query parameters so AllowEncodedSlashes must be On AllowEncodedSlashes On <Proxy *> AddDefaultCharset off Order deny,allow Deny from all Allow from all </Proxy> # mod_proxy rules ProxyPass /@api http://localhost:8081 retry=1 ProxyPassReverse /@api http://localhost:8081 SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 ## Logging ## # Possible values: debug, info, notice, warn, error, crit, alert, emerg LogLevel error CustomLog "/var/log/apache2/wiki.access.log" combined ErrorLog "/var/log/apache2/wiki.error.log" </VirtualHost>
I encountered an error at this point when I tried to visit the website. I assume this is a string parsing bug.
Error: MySQL enabled, but client version is too old: mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $. We require at least version 5.0.0 of the PHP MySQL client.
The “fix” was a bit more heavy handed than I normally prefer, but it works.
Open up the file ~/Sites/wiki.localdomain/maintenance/install-utils.inc and comment out the MySQL check.
Mine was at lines 43-48.
/*
$client_ver = mysql_get_client_info();
if ( !version_compare($client_ver, REQUIRED_MYSQL_VERSION, ">="))
{
echo_fail(wfMsg('Page.Install.check-mysqlc-fail', htmlspecialchars($client_ver), REQUIRED_MYSQL_VERSION));
$return = false;
}
*/After fixing the errors, visit http://wiki.localdomain and perform your initial setup.
Once setup is complete, you’ll need to locate your api key for use in next step:
$ cat /Users/YOUR-USERNAME/Sites/wiki.localdomain/LocalSettings.php |grep wgDekiApiKey|awk -F\" '{print $2}'
Next, edit /Library/LaunchDaemons/com.mindtouch.dekiwiki.plist and use this template:
(You’ll need to input your api key, and username into the template)
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Disabled</key> <false/> <key>KeepAlive</key> <true/> <key>Label</key> <string>com.mindtouch.dekiwiki.itasca</string> <key>ProgramArguments</key> <array> <string>sudo</string> <string>/usr/bin/mono</string> <string>/User/YOUR-USERNAME/Sites/wiki.localdomain/bin/mindtouch.host.exe</string> <string>apikey</string> <string>ENTER-API-KEY</string> <string>script</string> <string>/etc/dekiwiki/mindtouch.deki.startup.xml</string> <string>path-prefix</string> <string>@api</string> <string>http-port</string> <string>8081</string> <string>ip</string> <string>localhost</string> <string>notty</string> <string>connect-limit</string> <string>-5</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
Start the dekihost service on computer start.
$ sudo launchctl load /Library/LaunchDaemons/com.mindtouch.dekiwiki.plist
That’s it!
You should be up and running now.
I recently discovered that there is a bug in the way Microsoft dealt with EFI boot after the Vista SP1 (2008 RTM) release.
From http://support.microsoft.com/kb/931708:
This problem occurs because the ETFSBOOT.COM program does not handle file versions according to the International Standards Organization (ISO) 9660 specification.
Note The ETFSBOOT.COM program creates the CD boot sector.
The ISO 9660 specification instructs that a name for a file record should consist of the file name that is followed by the file version. Also, the specification instructs that you must separate the file name and the file version by a semicolon. For example, the following file record is valid:
FileName;1
The Windows PE file system driver handles the file version as an option. However, the ETFSBOOT.COM program cannot locate the Setupldr.bin/Bootmgr file if you use a file version.
Note The CDimage.exe program does not append a file version to a file name in a file record.
Therefore, if you use a program other than CDimage.exe or OSCDimg.exe to create the CDFS image file, the co
mputer does not start from the image.
The complex solution is outlined on Jowie’s Blog (in much
greater detail than here)
The simple solution is as follows (taken from: Sergio Mcfly’s Blog):
Hope this helps someone else!
I was working on porting an old page we have, but never quite got around to finishing it entirely, but several days of work had gone into the porting effort. I didn’t want to lose all my hard work so I figured I would check it in, but I also didn’t want people to try and use it before it was truely ready. If you ever experience a similar situation, this code may be of some use, while still retaining some good SEO.
protected override void OnInit(EventArgs e) { bool useNewSignup = Config.Default.GetConfigBool("signup", "useNew", false); if (!useNewSignup) { string absPath = Request.Url.AbsolutePath; string queryString = Request.QueryString.ToString().Length > 0 ? Request.QueryString.ToString() : String.Empty; if (!String.IsNullOrEmpty(queryString)) { newUrl += "?" + queryString;Response.Status = "301 Moved Permanently"; } string newUrl = "/signup.asp" + absPath; Response.AddHeader("Location", newUrl); } base.OnInit(e); }
Let me start from the beginning.
Yesterday, my company was updating our site with the usual round of fixes that hit with each release. Throughout the process, while updating some servers in our NLB cluster with my changes (Asp.net AJAX additions), we ran into some seriously weird errors.
Intermitant spews of the following:
SERVERNAME,SiteName,3/21/2007 2:47:26 PM,/ScriptResource.axd,Padding is invalid and cannot be removed.
I was baffled, as I had never seen such errors while developing on my machine, or after test deployment to our internal servers.
I soon discovered that the errors were caused by an incorrect d= value on WebResource.axd. The culprit appeared to be inconsistent encoded string generation across the NLB cluster. Through research, I also discovered that this problem also exists for persisting viewstate across server farms, which we had previously fixed by setting validationKey= in the machineKey node in Web.config. The fix for the WebResource error is similar, and appears to be a missing decryptionKey= attribute for the same machineKey node.
From what I understand, WebResource.axd will return a given client script based on any number of given scenarios (This is part of ASP.NET 2.0). Our scenario is to return client script for Atlas (asp.net’s ajax framework) in order to get our fancy asynchronous callback magic.
For whatever reason, we were not generating a consistent string across the farm without the attribute in place. So strings generated on Sever1, would not return the correct script on Server2, so on and so forth.
All 4 of our servers are now generating the same d= string.
You can reproduce the errors by altering the d= string.
More information on the string generation can be found here.
These incorrect d=[string here] values can surface for a number of reasons.
1) Search aggregates crawling the site and caching old machineKey values
2) Web Caching services, proxies, Google Cache, etc (We saw a ton of AOL proxy users throwing the exception)
3) Inconsistent machineKeys across farms
The only instance that pertains to us is the machineKey/NLB case.
I hope this helps someone, it was a headache to discover.
MonoTorrent has finally reached it’s first release milestone (pre-beta). I offered to design and host the website here @ apos.o, and it is now available for general consumption.
Alan has written a great piece of software here, I hope all you torrent lovin .NET hackers create some amazing stuff with this library!
According to the data supplied by my own company, I am underpaid.
Look for yourself.
If you’re like me, you hate the windowing methodology that comes with using any operating system microsoft puts out. I thought I would share a quick registry hack that will make your life much easier. The following was taken from vistababble.com.
In WinXP we could enable this by using the Power Toys. The Power Toys don’t seem to work to enable this feature in Vista, but you can still have this if you like by doing the below, but before proceeding remember to back up these registry entries first in case something goes wrong:
(This reg entry change not only makes the window active but makes it the forground window by bringing it foward on top of other windows when the mouse is over it.)
1. Open up Regedit and browse to [HKEY_CURRENT_USER\Control Panel\Desktop]
2. Look for the REG_Binary key “UserPreferencesMask” in the right pane. You will see its value as a string of hex numbers. Mine was hex 98,12,03,80,10,00,00,00.
3. Next you need to add the hex value ’41′ to the first hex value on the left in the hex string found in step 2.
Using the hex string I have as an example: 98h + 41h = d9h. You can use the Calculator (in scientific mode) in Vista to do this simple addition. My new hex value, using my example, string now becomes d9,12,03,80,10,00,00,00
4. Next, Right click on the “UserPreferencesMask” key and choose ‘Modify’,then alter the original value of
“UserPreferencesMask” to your new value found in step 3.
5. Next, at the same [HKEY_CURRENT_USER\Control Panel\Desktop] registry location right click in the right pane and choose to add a new DWORD (32-bit) value and name this value “ActiveWndTrkTimeout”. Next right click on your new “ActiveWndTrkTimeout” DWORD and choose modify and put in the time (in milliseconds) that suits you for the mouse switching between windows.
6. Close Regedit and re-boot.
Now for multiple windows open on the desktop, the window the mouse pointer is on will become the active window and come to the foreground without having to click on it. You may need to play with the value for “ActiveWndTrkTimeout” a little to get it correct. These are the values (below) I used to test with and the time for the mouse to remain over a window before its bought forward is 3 seconds (3000 miliseconds). Experiment with your time and find something that suits you:
Dear Prospective library maintainer,
I am a .NET programmer, with the need for specialized tools reliant on the BitTorrent network. Now I would have no issue if mature libraries for my platform of choice existed. I am also one man without the time to create his own library for .NET. This said, I am writing this as a plea to the other people out there who are creating their own libraries with no considderation given to independant open developers.
As far as I can tell, there are few choices for someone like myself.
1) Port existing C libraries to Managed C++ and create a wrapper in C# (ick)
2) Use David Smith’s binary open binary open free commercial library which lacks documentation and uses disingenuous licensing
3) Wait for someone to make an open-source library with a compatible license (I’m watching you Miguel & Alan)
4) Write my own
Obviously, you (as developers) are welcome to license and offer your code in any manor you deem prudent. I’m also quite aware of the impact your careers in software development may have tainted your view on licensing. I’ve had a similar experience with my current employer. The majority of our development team is composed of ex-Microsoft employees formerly associated with the ‘Indigo’ project. I am also sensitive to the importance required in keeping your intellectual property yours, and imposing stringent guidelines upon those who would use your works in an effort to sustain your business.
I mean, I know you put an enormous amount of effort into the development of this library, and I believe every developer should be compensated for his or her hard work. But, I certainly would never incorporate a library into any of my personal or professional applications that did not have a clearly defined path of evolution. On the other hand, I would be willing to incorporate a library with a clearly defined state of existence, a high level of developmental transparency, and a strong community derived support platform. It’s good to know that if development ceased for whatever reason, that my product (whatever it may be) would still continue to evolve without hindrance.
Maybe I’m wrong, but I see enormous benefit with an open model, and little with the traditional in the case of this particular project. You can still sell your product commercially, but I find it silly to cut out hobbyists and open source developers who could potentially build applications around your library, bolstering it’s worth in the eyes of potential buyers. But that’s just my take on it.
Because of the inherently restrictive nature imposed by a closed development process, closed code is quite literally unfeasible for most open source developers. In the event that the maintainer decided to cease development, it would leave every derived application out in the cold. When it comes to porting, patching, and altering his or her existing platform, no open developer with any common sense would allow his or her application to become ‘tainted’ in this way.
The principals behind an open model would involve open code. Developers and users abound can and would create feature rich applications using code derived from your library. This could come in the form of an extended feature set using the available code, bundled binaries, bundled code (Tested with a daily BVT recompile), community patch submissions, and quite likely other unforeseen applications.
Ideally, the open model can be used to embrace the addition and alteration of all interested parties, with ownership of the elements in question being returned to the developer. The idea is to restrict usage, license the source, and charge those who stand to profit by direct use of the library (commercial entities), but not those who foster the growth of the technology itself.
The technologies we use at my workplace are numerous, but we retain usage rights to all the source code involved (open source, or licensed). In fact, we have a stringent requirement that all involved technologies be built from source nightly. So in the unlikely event we find a cost benefit to move all our production servers to Mono/Apache
(or something), all the porting can happen in-house, and we are not reliant on any particular vendor.
Personally, I will have to wait until someone else develops a library without usage restrictions in order to offer my applications free of charge, in their entirety. Or if this does not happen, and in the unlikely event that I discover an exorbitant amount of free time, I could create my own library. (It’s sad, but work occupies 99% of my coding nowadays)
Site content and design copyright 2005-2010 bsd.bz