Wednesday, February 24, 2016

Windows Command line redirect stdout and stderr to the same file

I keep forgetting how to do this, so:
Windows Command line redirect stdout and stderr to the same file like this:

someprog.exe > log.txt 2>&1

Monday, February 22, 2016

maven run ant command only

Here is how to run only the ant command in maven:

mvn antrun:run compile

Assuming the pom.xml is like this:

<profiles>
  <profile>
    <id>x86-windows</id>
    <activation>
      <activeByDefault>true</activeByDefault>
    </activation>
    <build>
      <plugins>

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <executions>
            <execution>
              <id>compile</id>
              <phase>compile</phase>
              <goals>
                <goal>run</goal>
              </goals>
              <configuration>
                <tasks>
                  <echo>It worked! only running this part!</echo>



Thursday, February 18, 2016

Look into jar files using Windows Explorer

I sometimes want to look inside of jar files, and have been copying then to .zip and then using windows explorer to look inside them.  I just found out you can do this in a Admin Console:

assoc .jar=CompressedFolder

After which you can double click on a jar file in explorer and it gives you the choice to run it or open it explorer which then lets you look inside.

Monday, February 1, 2016

Using fiddler to change the port of a request

Using fiddler to change the port of a request.
Look here for how to do it:
http://docs.telerik.com/fiddler/KnowledgeBase/FiddlerScript/ModifyRequestOrResponse

Here is how I did it, I put this in the fiddler script:

if (true && oSession.fullUrl.Contains("someUrlPath/thatNeedsNewPort"))
        {
            oSession.host="localhost:12300";
        }