Grep from files matching a name in a directory

To look only at files matching a certain name (or part of a name) -name or -iname can be used.

-name pattern Base of file name (the path with the leading directories removed) matches shell pattern pattern. Because the leading directories are removed, the file names considered for a match with -name will never include a slash, so `-name a/b’ will never match anything (you probably need to use -path instead). The metacharacters (`*’, `?’, and `[]’) match a `.’ at the start of the base name (this is a change in findutils-4.2.2; see section STANDARDS CONFORMANCE below). To ignore a directory and the files under it, use -prune; see an example in the description of -path. Braces are not recognised as being special, despite the fact that some shells including Bash imbue braces with a special meaning in shell patterns. The filename matching is performed with the use of the fnmatch(3) library function. Don’t forget to enclose the pattern in quotes in order to protect it from expansion by the shell.

-iname pattern Like -name, but the match is case insensitive. For example, the patterns `fo*’ and `F??’ match the file names `Foo’, `FOO’, `foo’, `fOo’, etc. The pattern `*foo*` will also match a file called ‘.foobar’.

$ find /path/to/search/in/ -iname '201512*' -type f -print0 | xargs -0 grep "LookForString"
/path/to/search/in/20151209-000855.LOG:2015-12-09 08:01:15 LookForString is in this file
/path/to/search/in/20151219-001855.LOG:2015-12-19 23:15:47 LookForString is also in this file

AnkhSVN “No uncommitted changes” but nothing is shown in the log and update does not solve the warning

When doing a merge using AnkhSVN and doing “pre-merge best practices check” the error message “No uncommitted changes” is shown this means that the working copy is not updated or has changes that are not commited.

However sometimes this error can be shown even when the pending changes window in Visual Studio is empty and you have done update to Latest version. (Most likely there are files that Subversion see as missing or Deleted but that are not shown in the pending changes window)

The solution I use when this happens is to open the working copy folder and use TortoiseSVN to see what is going on and then solve things so that TortoiseSVN shows nothing in the pending changes.

Also from the console “svn status -q” can be used to see what files have changes. (-q means that we only would like status on files that are under version control.

Internet Explorer 10 Turning Compatibility mode on (From server)

In order to turn Compatibility mode on for Internet Explorer the server should send “X-UA-Compatible” as a header with the value IE=EmulateIE9. This will force Internet explorer to use compatibility mode if it is a version higher than 9

If we using ISS (making for instance a asp.net project) the following web.config can be used to do this.

<configuration>
  <!-- Other settings -->
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=EmulateIE9" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Mode details on the possible values for the header tag

Sometimes sending this as a header tag works, then this should be sent first in the header tag

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />

Internet Explorer 10 Turning Compatibility mode off (From server)

In order to turn Compatibility mode off for Internet Explorer the server should send “X-UA-Compatible” as a header with the value IE=Edge. This will force Internet explorer to use the latest mode the version has (this works from IE 6 to 11 and up)

If we using ISS (making for instance a asp.net project) the following web.config can be used to do this.

<configuration>
  <!-- Other settings -->
  <system.webServer>
    <httpProtocol>
      <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=Edge" />
      </customHeaders>
    </httpProtocol>
  </system.webServer>
</configuration>

Mode details on the possible values for the header tag

Cisco router configure static ip

2620XMR01>enable
Password:
2620XMR01#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
2620XMR01(config)#interface fastethernet 0/0
2620XMR01(config-if)#ip address 10.100.0.50 255.255.255.0
2620XMR01(config-if)#no shutdown
2620XMR01(config-if)#
*Mar  1 00:06:09.167: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:06:10.167: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
2620XMR01(config-if)#exit
2620XMR01(config)#exit
2620XMR01#
*Mar  1 00:06:17.383: %SYS-5-CONFIG_I: Configured from console by console
2620XMR01#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]