Based on:
Steps:
SPDiagnosticsService.Local.WriteTrace(0, | |
new SPDiagnosticsCategory(this.NamingContainer.ToString(), | |
TraceSeverity.Unexpected, | |
EventSeverity.Error), | |
TraceSeverity.Unexpected, | |
ex.Message, | |
ex.StackTrace); |
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { | |
Add-PSSnapin "Microsoft.SharePoint.PowerShell" | |
} | |
$web = Get-SPWeb 'http://win13a/sites/dev' | |
$web.AllProperties['PropertyName'] = '312' | |
$web.Update() | |
$webApp = Get-SPWebApplication 'http://win13a/' |
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
<!-- .... --> | |
<!-- | |
Add .svc to let build tool to substitute$SharePoint.Project.AssemblyFullName$ like | |
placeholders during build process. | |
var dialog = null; | |
function showDialog(){ | |
SP.SOD.loadMultiple(['sp.ui.dialog.js','strings.js'], function(){ | |
dialog = SP.UI.ModalDialog.showWaitScreenWithNoClose("Please wait...", 'Loading data', null, null); | |
}); | |
} |
# execute as: mongod -f mongodb.conf | |
storage.preallocDataFiles: false | |
storage.nsSize: 4 | |
storage.smallFiles: true | |
storage.dbPath: "mongodata/" |
# with VPN, add an host skipping VPN | |
sudo route add -host 10.0.0.145 -gateway 10.0.0.3 | |
# remove entry | |
sudo route delete -host 10.0.0.145 | |
# show all routes | |
netstat -nr |
Based on:
Steps:
grep -E "https?\:" filename.config | sed -E 's/^.*(https?:\/\/[^\/"]+).*$/\1/' | sort | uniq | |
# use to copy to clipboard (osx only) | pbcopy |
public class NHContext :IDisposable | |
{ | |
#region init | |
protected static ISessionFactory _sessionFactory; | |
public ISessionFactory SessionFactory { | |
get { | |
if (_sessionFactory == null) Init(); |
$siteUrl = "http://sharepoint/" | |
$listName = "Site Assets" | |
$fileName = "OfferApp.xap" | |
$filePath = "OfferApp.Web\ClientBin\" + $fileName | |
[system.reflection.assembly]::LoadWithPartialName("Microsoft.Sharepoint") | |
$site = New-Object Microsoft.SharePoint.SPSite($siteUrl) | |
$web = $site.OpenWeb() |