Tuesday, December 2, 2014

WASP x64 ( Windows x64 , Apache 2.4 x64 , SVN, PHP )

To make things easy WASP will now go out in the wild.

Ever wanted a 64 bit distribution of apache 2.4, svn and php but putting all the parts together caused butt pain?
Well here you go.

How stable is it?
It hasn't crashed in production. YET.

How is it configured?
httpd.conf. It uses lots of memory! It eats 2.3 GB of RAM, and then holds steady due to a 2GB svn cache. If you have a small repo and more RAM? MAKE the cache BIGGER!

In production it currently serves a 1.6TB svn repo with 465k revisions that is growing, and acts as a proxy for multiple internal web servers. It also runs PHP so you can use it to do other useful things. Uses rotatelogs to make daily rotating logs, cause usually no one sets this up either!

Why did I put it together?
Because nothing out there fit my needs.

Why did I put this here?
Because hopefully it'll benefit someone else that also wants to roll their own and not use collabnet/wandisco/visualsvn. They are all great products, but not quite what I'm looking for.

How do I install it?
Extract to C:\WASP. Run httpd.exe

Download




Monday, July 21, 2014

Note to self : 0x000001d error

Usually means some /arch: for code generation that is not supported, like SSE2 / AVX

Monday, June 9, 2014

Beware the Windows Scheduled Tasks!

I've had a TeamCity server run much much slower than it's other counterparts.

I finally narrowed it down to Scheduled Tasks. The agent was started at logon by Scheduled Tasks.

It looks like Scheduled Tasks will start in under below normal priority and while this wasn't a problem for many of our build tools, TortoiseSVN however performs very very poorly in below normal priority.

Simple Hall and Teamcity Integration

You will have to set up these 2 parameters as environment variables to be passed in your TeamCity project parameters configuration.

env.BuildID = %teamcity.build.id%
env.BuildTypeID = %system.teamcity.buildType.id%

Checks to see if it's running under TeamCity and then sends the INFO

if not "%TEAMCITY_PROJECT_NAME%" == "" curl -X POST -H "Content-Type: application/json" -d "{\"title\":\"TeamCity\",\"message\":\"Failed - %TEAMCITY_PROJECT_NAME% - %TEAMCITY_BUILDCONF_NAME% - %BUILD_NUMBER% ^<a href="http://TEAMCITYURL/viewLog.html?buildId=%BuildID%&buildTypeId=%BuildTypeID%&tab=buildResultsDiv"^>View Build^</a^>\",\"picture\":\"http:/TEAMCITYURL/img/icons/TeamCity32.png\"}" https://hall.com/api/1/services/generic/HALLID

Thursday, June 5, 2014

Visual Studio Property files and line endings

If you like to lay out multi line preprocessor definition in macros in .props files.

<pc32_preprocessor>
      WF_PC32;
      WIN32;
      _CRT_SECURE_NO_WARNINGS;
      $(FORCED_ENVARS)
</pc32_preprocessor>

Something like that. Certain plugins like the clang plugin will cause all sorts of interesting errors because it'll pass the command line to the compiler with the CRLF.

Change line endings to Old Mac format CR only.

VS will allow you to edit and it will respect the line endings and wont convert it, and it seems to pass through to the compiler just fine.

Integrating windows hosted SVN with hall, logs and diffs provided with WEBSVN

For posterity

SET PATH=%PATH%;E:\svn;E:\curl\bin;E:\bin

SET REPOS="%1"
SET REV=%2

SET HALLROOM=put Group API Token here
SET WEBSVNHOST=https://YOUR_URL_HERE/revision.php?repname=REPONAME
SET PATHTOMATCH=trunk

REM HALL INTEGRATION

svnlook author %REPOS% --revision %REV%> E:\temp\svnlook%REV%_USER
SET /P SVN_USERNAME=<E:\temp\svnlook%REV%_USER
del E:\temp\svnlook%REV%_USER

svnlook log %REPOS% --revision %REV%> E:\temp\svnlook%REV%_LOG
SET /P SVN_COMMIT_MESSAGE=<E:\temp\svnlook%REV%_LOG
del E:\temp\svnlook%REV%_LOG

svnlook dirs-changed %REPOS% --revision %REV%> E:\temp\svnlook%REV%_CHANGED
SET /P SVN_COMMIT_DIRECTORY=<E:\temp\svnlook%REV%_CHANGED

SET SVNMESSAGE=Revision : %REV% - %SVN_USERNAME% - %SVN_COMMIT_MESSAGE%

grep -E "%PATHTOMATCH%" E:\temp\svnlook%REV%_CHANGED
if "%ERRORLEVEL%"=="0" curl -X POST -H "Content-Type: application/json" -d "{\"title\":\"SVN Commit\",\"message\":\"%SVNMESSAGE%^<br^> ^<a href="%WEBSVNHOST%&path=%%2F&rev=%REV%"^>Inspect Log^</a^>\"}" https://hall.com/api/1/services/generic/%HALLROOM%

del E:\temp\svnlook%REV%_CHANGED

Wednesday, May 1, 2013

Reset WINS cache on a QNAP device

Disable WINS server from web administration page

SSH into it

cd /var/log/samba/locks

delete wins.dat

Enable WINS server from web administration page

Done.

Saturday, April 27, 2013

I just purchased Trillian Pro for life...

Unfortunately, I'm probably never ever going to use it. Do I regret it? A little, but I wanted to give it a fair shot.

Introduction

I really wanted an IM app that would do all the services I use. Pidgin and Miranda both support Skype through the SkypeAPI, but that integration is iffy at best.

I admit that my needs are very different from most people but here is why Trillian is basically unusable to me :

UI and customization

This is my miranda setup. Here are the highlights of this UI setup.

  • Lack of whitespace and window dressing and borders. Keyboard navigation lets me do everything.
  • Names are indented in groups. 
  • No status messages. I show only the data I need and I want to know.
  • The smaller bottom chat window is set to always on top
  • The larger chat window houses my IRC channels, and that is set to NOT always on top
  • Every window remembers what tab container it belongs to.



In contrast with Trillian.

  • Lots of wasted space
  • No indents on names under groups
  • In tiny vs simple UI, names are indented but status messages show up. There needs to be an in between setting.
  • Tabbed Chat Windows are always on top or not, I cannot specify per window.
  • Tabs do not remember which group they are in. Once I close the application, IRC boots up and opens the large chat window first, every chat window I open from then on goes to the big chat window, and not a smaller one below.



Insufficient keyboard navigation


In Miranda, keyboard navigation alone is enough for me to do everything. I almost never have to touch a mouse

CTRL+SHIFT+R = go to next waiting message ( event:next event does not seem to work the way it used  to in trillian Pro 1.0, if it does, then I have no clue how to get it working correctly )
CTRL+SHIFT+A = pull up the contact list ( this still works )
CTRL+W = close a window ( this works )
CTRL+PGUP/PGDOWN =  go to the next tab (also still works )

Incomplete Skype group chat support

The main reason I wanted to use Trillian was because of its SkypeKit support, and not have to have Skype running in the background. Unfortunately, this feature is not 100% complete. It lets you receive messages from a group conversation, but there is no way to send to that group if you don't already have it open. The poor UI I could kind of deal with, but this feature is the most important of all.

Slow

Everything in Skype animates in and out with a fade. Give an option to turn this off. I don't need fades, I want quick response time. Opening a chat window to a contact takes half a second, and closing it takes half a second as well.

Why does it take such a long time for it to shut down? I can see it sit in task manager for a good 15 seconds before the process finally goes away.

Conclusion

I really wanted to switch back to Trillian since I have fond memories of my Trillian Pro 1.0 days. You guys were the best around back then. Unfortunately, with the way Trillian works right now, the user experience does not fit my needs.

Wednesday, October 17, 2012

VSPTree is alive!

I've been using Windows 8 for the last couple of months and have been having a great time with it. It's Windows 7 with a nice flat UI, much faster I/O. Stability is the same, and pretty much have never opened a metro app. I'm not even sure how to use those correctly. The new Start Menu is just a very big start menu to me.

Anyway I digress, I needed to profile something and went with the usual suspects. CodeAnalyst, Got no data. AQTime, failed to launch the exe. Very Sleepy, worked but no hierarchical call graph. Tried to resurrect VSPTree with the VS2010 profiler and I got a driver not allowed error.

Oh well. Some digging around and I found Remote Tools for Visual Studio 2012.

So I took a little time and updated VSPTree to work with it, and added some minor usability updates. It's not the best application in the world, but sometimes it's handy just to have it.

VSPTree 0.5 : Now with Windows 8 64 bit support. Here.

Friday, October 12, 2012

Conditionals in Property Sheets

I've since moved to using property sheets exclusively instead of wfMake and it's been going well. A bit more more typing but I like the fact that I can edit a bunch of includes and not have to regenerate the vcproj/vcxproj. The most time consuming part was going through all the projects and setting the right macros everywhere. But you only have to do it once.

It's one place to update everything and can be syntax highlighted and formatted quite neatly.

You end up with something like this. This is only an excerpt, the whole thing is quite huge. You can then string your macros any way you like. The fanciest bit of this is the conditionals at the top that I use because some sln's that include these projects are sometimes in different places, and there was no other way I could think of to correctly set the path.



  
  
    
      
        $(ProjectDir)..\..\..\
      
    
    
      
        $(ProjectDir)..\..\..\
      
    
    
      
        $(SolutionDir)
      
    
  
  
    
    
      WF_DEBUG;
      _DEBUG
    

    
      WF_RELEASE;
      NDEBUG
    

    
      WF_FINAL;
      NDEBUG
    

    
    
      WF_PC32;
      WIN32;
      _CRT_SECURE_NO_WARNINGS;
      $(FORCED_ENVARS)
    

    
      $(WF_DEBUG);
      $(PC32_PREPROCESSOR);
      __PLACEMENT_NEW_INLINE