Skip to content

Instantly share code, notes, and snippets.


Jaime Jaramillo jjaramillo

  • Globant
  • Bogotá, Colombia
View GitHub Profile
jjaramillo / copytogac.ps1
Last active Aug 29, 2015
How to copy a dll to GAC in windows server 2012 using powershell
View copytogac.ps1
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
jjaramillo / inicio.aspx
Created Apr 22, 2014
sample page for provisioning
View inicio.aspx
<%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<%@ Reference VirtualPath="~TemplatePageUrl" %> <%@ Reference VirtualPath="~masterurl/custom.master" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
<!--[if gte mso 9]><SharePoint:CTFieldRefs runat=server Prefix="mso:" FieldList="FileLeafRef,Comments,PublishingStartDate,PublishingExpirationDate,PublishingContactEmail,PublishingContactName,PublishingContactPicture,PublishingPageLayout,PublishingVariationGroupID,PublishingVariationRelationshipLinkFieldID,PublishingRollupImage,Audience,PublishingIsFurlPage,PublishingPageImage,PublishingPageContent,SummaryLinks,Art
jjaramillo / query.sql
Created Jul 4, 2014
If you ever get "Restore-SPSite : The operation that you are attempting to perform cannot be completed successfully. No content databases in the web application were available to store your site collection. The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may alread…
View query.sql
SELECT [DeletionTime]
FROM [content_database_name].[dbo].[SiteDeletion]
jjaramillo / gist:565af749e0d3c91c06da
Created Feb 25, 2015
Awesome caml generator extesion for sharepoint >= 2010 and Chrome
View gist:565af749e0d3c91c06da
jjaramillo / gist:255e3da0fe261071c5ce
Created Apr 16, 2015
Reduce NodeRunner.exe resource consumption...
View gist:255e3da0fe261071c5ce
Use Set-SPEnterpriseSearchService -PerformanceLevel Reduced to reduce the CPU impact the search service
Modify the C:\Program Files\Microsoft Office Servers\15.0\Search\Runtime\1.0\noderunner.exe.config so that it can only consume X amount of RAM. Change the value at to any amount of RAM you like to contain the memory leak.
Do not forget to restart the search service so the modification could be effective.
View everyday.sp2013.ps1
#add indexes to a field on a list
Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
function IndexField($fieldName, $spList)
$spField = $spList.Fields[$fieldName]
$spField.Indexed = $true
jjaramillo / Restore-SPUserInfo.ps1
Last active Aug 29, 2015
Sometimes someone might screw up you sharepoint user related info by deleting information on the user profile service... This script might help you out restoring the user information integrity on your site...
View Restore-SPUserInfo.ps1
function Restore-SPUserInfo{
[Parameter(Mandatory=$true, HelpMessage='data container url')]
[Parameter(Mandatory=$true, HelpMessage='library template type id')]
[Parameter(Mandatory=$false, HelpMessage='parent content type id for the data you want to process')]
jjaramillo / CurrentFormData_SetFormData.js
Created Sep 21, 2011
"Override" the "callback" function triggered after infopath executes an async call on an infopath browser enabled form
View CurrentFormData_SetFormData.js
(function () {
var nCurrentFormData_SetFormData = CurrentFormData_SetFormData;
CurrentFormData_SetFormData = function () {
nCurrentFormData_SetFormData.apply(this, arguments);
//Your custom code here
jjaramillo / gist:1403566
Created Nov 29, 2011
SVC Log output for the serialization exception
View gist:1403566
The type 'DondeCompro.Data.Afiliado' cannot be serialized to JSON because its IsReference setting is 'True'. The JSON format does not support references because there is no standardized format for representing references. To enable serialization, disable the IsReference setting on the type or an appropriate parent class of the type.
System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph)
System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph)
System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
jjaramillo / app.config
Created Nov 29, 2011
If you ever need to log what a wcf service is doing here's how to. Go to your web.config or app.config file and start adding this
View app.config
<!-- ... -->
<messageLogging logEntireMessage="true" logMalformedMessages="true"
logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true" />
<source name="System.ServiceModel" switchValue="Warning, ActivityTracing"