CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Category Archives: Uncategorized

How to reference nested class or struct etc, in PowerShell

Discovering SharePoint

I had a problem trying to reference a struct inside a public class from PowerShell. I tried to do it just like in C#, only with PowerShell syntax, simply adding the nested class or struct in the namespace, separated by a dot.

Doesn’t work:

$myProperty = [MyProject.MyClass.MyClassStruct]::MyProperty

But this didn’t work. Instead I got the following error:
Unable to find type [MyProject.MyClass.MyClassStruct]: make sure that the assembly containing this type is loaded.”

It seems, after fiddling around a bit and doing a quick search, that PowerShell has it’s very own way of calling a nested class or struct. Instead of adding the nested class with a dot, you actually have to use a +, like this:

Works:

$myProperty = [MyProject.MyClass+MyClassStruct]::MyProperty

I don’t know why, but that’s the way you do it. =)

Resources:

http://stackoverflow.com/questions/14141690/special-use-of-plus-sign-in-powershell

View original post

IntelliJ Keyboard Shortcuts

I want to use shortcuts. I prefer the IntelliJ keyboard scheme. Which do you use?

Technical interview solutions

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
Show available quick-fixes and context actions Alt+Enter Alt+Enter
Paste multiple Ctrl+Shift+V
Code cleanup Ctrl+E, C Ctrl+Alt+F
Silent code cleanup Ctrl+E, F Ctrl+Shift+Alt+F
Symbol code completion Ctrl+Space Ctrl+Space
Smart code completion Ctrl+Alt+Space Ctrl+Shift+Space
Import symbol completion Shift+Alt+Space Ctrl+Alt+Space
Complete statement Ctrl+Shift+Enter Ctrl+Shift+Enter
Parameter information Ctrl+Shift+Space Ctrl+P
Quick documentation Ctrl+Shift+F1 Ctrl+Q
Insert live template Ctrl+E, L Ctrl+J
Surround with template Ctrl+E, U Ctrl+Alt+J
Generate code Alt+Insert Alt+Insert
Create file from template Ctrl+Alt+Insert Ctrl+Alt+Insert
Move code up Ctrl+Shift+Alt+Up Ctrl+Shift+Alt+Up
Move code down Ctrl+Shift+Alt+Down Ctrl+Shift+Alt+Down
Move code left Ctrl+Shift+Alt+Left Ctrl+Shift+Alt+Left
Move code right Ctrl+Shift+Alt+Right Ctrl+Shift+Alt+Right
Extend selection Ctrl+Alt+Right Ctrl+W
Shrink selection Ctrl+Alt+Left Ctrl+Shift+W
Duplicate a line or selection Ctrl+D Ctrl+D
Comment with line comment Ctrl+Alt+/ Ctrl+/
Comment with block comment Ctrl+Shift+/ Ctrl+Shift+/
Inspect this Ctrl+Shift+Alt+A Ctrl+Shift+Alt+A
Inspection Results window Ctrl+Alt+V
Turn code analysis on/off Ctrl+Shift+Alt+8 Ctrl+Shift+Alt+8

Navigation and Search

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
Find…

View original post 312 more words

The CDN concept in SharePoint

How many instances of jquery are there in your SharePoint farm?

 Get-SPWebApplication http://dev `
  | Select -Expand Sites `
  | Select -Expand AllWebs `
  | Select -Expand Lists `
  | Select -Expand Items `
  | ? { $_.Url -match "jquery.*.js" } `
  | select Name, Url

Have you more than two (jquery and jquery-ui), then you have too much. You can save much place and performance by using Content Delivery Network (CDN) links for the resources like javascript, css, fonts and icons. Consider those Content Delivery Networks:

CDN for custom resources

But can we benefit from this CDN concept for our custom resources? I think so, if your farm has ten thousands of site collections, and you deploy javascript files, css files in the Style Library, it would be great to eliminate resource duplicates. So my thougt is to deploy resources to one place. It could be:

  • An external web application static.contoso.com like many web applications do
  • A dedicated site collection for resources cdn.contoso.com with Anonymous access
The CDN concept in Office 365

Have you noticed that Office 365 uses cdn links for almost all SharePoint javascript files that traditionaly were referenced from the _layouts folder

cdn-001

With this I want to raise a question. What do you think about the CDN concept within SharePoint? Have you used it? Have you plans to have it?

Run Hyper-V and VirtualBox on the same machine

This applies to the combination Hyper-V and VMWare as well. Really good stuff.

#disable, needs computer restart
bcdedit /set hypervisorlaunchtype off
#enable, needs computer restart
bcdedit /set hypervisorlaunchtype auto

derekgusoff

Recently I upgraded to the Windows 8 RTM build for my main work laptop, and began working with Hyper-V, which is available on a client OS for the first time with Windows 8.  Since I use virtualization to do SharePoint development every day, I was eager to see what Hyper-V could do.  So far, I am impressed.  It performs well and stays out of my way when I’m not using it.

However, my project team at work is heavily invested in VirtualBox, and rather than try to make all their updates to my new VM, it makes more sense to develop on the same system as the rest of the team.  The challenge is that VirtualBox and Hyper-V cannot co-exist on the same machine.  Only one hypervisor can run at a time, and since Hyper-V runs all the time, while VirtualBox only runs when it is launched, VirtualBox is the…

View original post 129 more words

Using GitFlow with Visual Studio and SourceTree

I enjoyed this intro to git in visual studio.

Johan Leino

I’m a Microsoft guy. I like their products, development tools, the whole lineup really.
However, a couple of months ago I started using git (or github if I should be completely honest…but that’s based on git) for version control. Coming from a Microsoft environment with first Source Safe and later on TFS (or TFVC really) it was a bit of a leap to take from Centralized Version Control to Distributed Version Control since that is really the biggest leap to take (I think).
Endjin has very good way of describing the difference as:

My favourite way of describing the difference between the TFS and Git branching models is as follows, in TFS – branching is essentially like the TV Show Fringe in that you have to deal with parallel worlds crossing between those world is a difficult process with severe health risks to the person “crossing over”, whereas with…

View original post 653 more words

Making the Newsfeed web part available outside of My Sites in SharePoint 2013

Easy to add a newsfeeed to a web other than My Site.

Bernado Nguyen-Hoan's Blog - Coding Stories from an IT Mercenary

The Newsfeed is a key piece in SP2013’s approach to social computing. It appears on the landing page of My Site as below:

Newsfeed

This is actually a web part titled Newsfeed, and can be found under the Social Collaboration category. Now, you may want to have the Newsfeed on the homepage of your main portal rather than My Site. To make this web part available in your site collection, you will need to activate the feature with title “My Site Layouts Feature“. This is a hidden site collection feature so you will need to use SharePoint Manager or PowerShell. The feature ID is 6928B0E5-5707-46a1-AE16-D6E52522D52B. Its physical location under {SharePointRoot} is TEMPLATE\FEATURES\MySiteLayouts.

This feature brings a number of other web parts and also the MySite.master master page. Check its manifest for further details.

View original post

JQuery 2.0 – Notes About the Official Release

jQuery 2.0 leaves behind the older Internet Explorer 6, 7, and 8 browsers. In return it is smaller, faster.

Justin Cooney

The latest news coming from the world of jQuery is the official release of jQuery 2.0.

The new  jQuery 2.x library is a significantly smaller file size than the jQuery 1.x series of libraries, but the 2.0 library does not support versions of Internet Explorer prior to version 9.

For the foreseeable future, the makers of jQuery plan to run two separate lines of the jQuery library:

  1. The jQuery 1.x library will continue to be developed for years to come and will support older browser versions.
  2. On the other hand, the jQuery 2.x library will support newer browsers and will offer both a smaller file size, and likely modern features that older browsers can not support.

Note: Have a look at this series of articles covering jQuery if you find this post interesting and want to read more about the subject.

View original post 299 more words

SQL Server delete backup history

Exactly what I needed today.

use msdb
go
sp_delete_backuphistory '2013-01-30'

See more details on sp_delete_backuphistory stored procedure on msdn

Great stuff. I would like to try it out, too.

SharePointRyan

I’ve been using PowerShell for quite a while now, as you may have gathered from some of my previous posts. 🙂 However, I have yet to really dig into PowerShell Web Access (PSWA) with Windows Server 2012. That is, until today.

I have been slowly getting my VM environment up to par on my new Focal Point Solutions laptop, and the last piece that I was hoping to try was PSWA with SP2013. I assumed this would work, but in a few Google searches I had yet to find anyone who had shown any screenshots of this working – so I decided to be that guy.

In the screenshots below, I am running PSWA from Google Chrome on my host (Windows 8) – connecting to a VM running on my local Hyper-V instance. The VM is SP2013 connected to another VM for a domain controller. I’ve got Hyper-V networking set up so that all of…

View original post 170 more words

I am impressed. An excelent example of the power of JavaScript and the SharePoint client object model

Вула Чăвашла

VulaCV - Чăвашла вулаттаракан сайт

Discovering SharePoint

And going crazy doing it

Bram de Jager - Coder, Speaker, Author

Office 365, SharePoint and Azure

SharePoint Dragons

Nikander & Margriet on SharePoint

Paul J. Swider - RealActivity

RealActivity is a specialized Microsoft healthcare services and solution advisory firm.

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points !

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

Aryan Nava

| Blockchain | Serverless Architecture | Microservices Architecture | DevOps | AWS Lambda | Teraform |

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis