• How to see delegate calendars with your google apps account & an IOS device setup as “Exchange”

    I can never remember this. More of a note to myself. I just got the new iPad (thanks wife!) and when I added my google apps account as an Exchange server, my delegate calendars did not show (for example, the shared family calendar).

    All I needed to do was to visit m.google.com/sync from the iPad, log in, and I can select what calendars my device sees.


  • My Debian/Raspberry Pi cheat sheet (translations from CentOS)

    I have worked on Solaris and RedHat/CentOS (although Solaris was many years ago, so I  should just admit that I no longer know where anything is). I find Debian to be a different dialect than RedHat. This post is going to serve as my translation cheat sheet.

    1. I use the  bash complete string below with ssh and ping. It was not working under Debain. Turns out that the host names are hashed in the known_hosts files under Debian. I had to add “HashKnownHosts no” to my .ssh/config and then re-populate the known_hosts file.
      complete -W "$(sed -e 's/^  *//' -e '/^#/d' -e 's/[, ].*//' -e '/\[/d' ~/.ssh/known_hosts | sort -u)" ssh ping
      
    2. Debian on arm does not seem to have sysvconfig so I need to go into /etc/init.d/script name to start,stop,restart,status a service
    3. To stop a service from running at boot “update-rc.d -f smb remove” (chkconfig smb off)
    4. To start a service at boot “update-rc.d nfs defaults” (chkconfig nsf off)
    5. cat /etc/debian_version = cat /etc/redhat-release
    6. More to come

  • RSS feed for a vBulletin forum

    I am constantly having to look this up. What is a vBulletin’s form’s rss feed?

    http://www.myforum.com/external.php?type=rss&forumids=1

    Obviously the admin has to enable it. Have not tested against all versions

     


  • Server ran out of space and not accepting connections after freeing up space

    I was away on vacation, and a dev box ran out of space. Once I got back, I cleaned it up, rebooted and still could not connect to it. @xrobx99 noticed an IPSec message in the event logs:

    The IPSec driver has entered Block mode. IPSec will discard all inbound and outbound TCP/IP network traffic that is not permitted by boot-time IPSec Policy exemptions.

    We thought that was suspect as we weren’t using IPSec policies. It seems that our server ran out of space and the IPSec policy became corrupted.

    I ran the command :

    regsvr32 polstore.dll

    This command rebuilds the local policy store. I rebooted and all was fine.

    Hope that helps someone.


  • How to add custom JavaScript code to all SharePoint 2010 pages (DelegateControl)

    As I said in this post, there are plenty of articles on how to do this. This is more of a note for myself, as I have to “re-learn” this every time I need to customize SharePoint.

    There are 2 ways (that I know of) that you can add code to every page in SharePoint 2010, 1 by the AdditionalPageHead delegate control, or ,2 by Custom Action. This article is about #1 (see #2 here) using the AdditionalPageHead delegate control.

    • Start Visual Studio, and create a new Empty SharePoint Project (uncheck the Create Directory for Solution because you salways create the destination directory yourself)
    • Deploy as a Farm Solution (I have not figured what you can and can’t do with sandboxed solutions yet)
    • RightClick the Project and Add –> New item –> User Control –Name it. This will create a new folder named ControlTemplates and inside will be your User Control. Looks like this

    • Edit the new ascx file and add the code you want to put at the top of every page, for example:
    <script type="text/javascript" src="/path/to/jquery.js"></script>
    
    • RightCLick the Project and select Add Empty Element and name it at the bottom
    • add the following to the elements.xml file. The final should look like this below:
      <Control Id="AdditionalPageHead"
              Sequence="90"
              ControlSrc="~/_CONTROLTEMPLATES/DelegateControl/DelegateControl.ascx" />
    

    Package everything up and you will now see your reference to jQuery on the top of all pages.


  • ‘b’ is null or not an object

    This is a reminder to my self that this blog post has the solutoin to the “b” error when working with the Client Object Model. Basically I need to change this:

    createDelegate(this, this.onSuccessMethod)

    to this:

    createDelegate(this, onSuccessMethod)


  • Move the “Add new item” to the top of a list page in SharePoint 2010

    We did not like how SharePoint 2010’s “Add new item” was on the bottom of the page. we wanted to move it to the top. The following jQuery code moves it to the top of the page:

    $(“#s4-mainarea”).prepend($(“td.ms-addnew”))

    hope that helps someone.


  • PowerShell script to set the State of a record in Microsoft CRM 2011 (SOAP)

    I wanted to mark a meeting/appointment as completed via code. I came up with the PowerShell script below. Maybe it will be of use to some one?

    
    FUNCTION JBM-CRM-SetState {
    PARAM(
        [string][ValidateSet("crmserver.company.com", "dev-crmserver.company.com")]$ServerName="crm.sardverb.com",
        [string][ValidateSet("CRMOrganizationName")]$OrganizationName="SardVerbinnen",
        [string][parameter(Mandatory=$true)][ValidateSet("email", "phonecall", "appointment")]$EntityType,
        [string][parameter(Mandatory=$true)][ValidateScript({ $_ -match("^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$")})]$TargetGUID,
        $State=1,$Status=3,[switch]$MyDebug
        )
    $requestMain = ""
    $requestMain += "<s:Envelope xmlns:s=`"http://schemas.xmlsoap.org/soap/envelope/`">";
    $requestMain += "  <s:Body>";
    $requestMain += "    <Execute xmlns=`"http://schemas.microsoft.com/xrm/2011/Contracts/Services`" xmlns:i=`"http://www.w3.org/2001/XMLSchema-instance`">";
    $requestMain += "      <request i:type=`"b:SetStateRequest`" xmlns:a=`"http://schemas.microsoft.com/xrm/2011/Contracts`" xmlns:b=`"http://schemas.microsoft.com/crm/2011/Contracts`">";
    $requestMain += "        <a:Parameters xmlns:c=`"http://schemas.datacontract.org/2004/07/System.Collections.Generic`">";
    $requestMain += "          <a:KeyValuePairOfstringanyType>";
    $requestMain += "            <c:key>EntityMoniker</c:key>";
    $requestMain += "            <c:value i:type=`"a:EntityReference`">";
    $requestMain += "              <a:Id>$TargetGUID</a:Id>";
    $requestMain += "              <a:LogicalName>$EntityType</a:LogicalName>";
    $requestMain += "              <a:Name i:nil=`"true`" />";
    $requestMain += "            </c:value>";
    $requestMain += "          </a:KeyValuePairOfstringanyType>";
    $requestMain += "          <a:KeyValuePairOfstringanyType>";
    $requestMain += "            <c:key>State</c:key>";
    $requestMain += "            <c:value i:type=`"a:OptionSetValue`">";
    $requestMain += "              <a:Value>$State</a:Value>";
    $requestMain += "            </c:value>";
    $requestMain += "          </a:KeyValuePairOfstringanyType>";
    $requestMain += "          <a:KeyValuePairOfstringanyType>";
    $requestMain += "            <c:key>Status</c:key>";
    $requestMain += "            <c:value i:type=`"a:OptionSetValue`">";
    $requestMain += "              <a:Value>$Status</a:Value>";
    $requestMain += "            </c:value>";
    $requestMain += "          </a:KeyValuePairOfstringanyType>";
    $requestMain += "        </a:Parameters>";
    $requestMain += "        <a:RequestId i:nil=`"true`" />";
    $requestMain += "        <a:RequestName>SetState</a:RequestName>";
    $requestMain += "      </request>";
    $requestMain += "    </Execute>";
    $requestMain += "  </s:Body>";
    $requestMain += "</s:Envelope>";
    if ($MyDebug){write-host $requestMain}
    
    $url="http://$ServerName/$OrganizationName/XRMServices/2011/Organization.svc/web"
    
    $http_request = New-Object -ComObject Msxml2.XMLHTTP
    $http_request.Open('POST', $url, $false)
    $http_request.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Execute");
    $http_request.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    $http_request.setRequestHeader("Content-Length", $xml.length);
    $http_request.send($requestMain);
    if ($MyDebug){$http_request.responseText}
    }