Skip to content

Instantly share code, notes, and snippets.

Andrew Connell andrewconnell

Block or report user

Report or block andrewconnell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.ts
//web components ES5 shim
import '../../../elements/wc-shim'
import { registerAsCustomElements } from '@angular/elements';
import { platformBrowser } from '@angular/platform-browser'
import { HelloWorld, HelloWorldModule } from './hello-world'
import { HelloWorldModuleNgFactory } from './hello-world.ngfactory'
registerAsCustomElements([HelloWorld], () => platformBrowser()
.bootstrapModuleFactory(HelloWorldModuleNgFactory, {ngZone: 'noop'}))
View AttachTo_ASPNETWP.vbs
' This routine attaches to the ASP.NET worker
processSub AttachTo_ASPNETWP()
Dim attached AsBoolean = False
Dim proc As EnvDTE.Process
Dim processToAttachTo AsString
' name of the process to attach to
processToAttachTo = "aspnet_wp.exe"
' iterate through all processes running on the local machine
View BuildMssqlftQuery.1.cs
public string BuildMssqlftQuery(string searchParm,
string searchScope,
Components.AdvancedSearchOptions advancedOptions) {
StringBuilder keywordList = new StringBuilder();
// clean out noise
Stack cleanKeywords = this.RemoveNoise(searchParm,
ConfigurationSettings.AppSettings["SearchNoiseFile"].ToString()
);
View git1.sh
git checkout dev
# update your local dev to be a mirror of what's in the main repo
git pull --rebase upstream dev
View docker-compose.demo.yml
version: '2'
services:
webapp:
# use the image that's clean, ready to do the live coding demo
image: andrewconnell/pres-ng2-officeaddin:ng2-demo-start
ports:
- "443:3433"
# map the current folder root on HOST => CONTAINER so container will
# use files from HOST as I code locally
# but leave node_modules & typings in the container so don't have to
View commit-release.sh
# assuming on the dev branch with release changes...
# save changes to dev & commit as a new release, 0.5.1 in this example
git add -A
git commit -m "docs(release): 0.5.1"
git push origin dev
# jump to master branch & update with changes at tip of dev
git checkout master
git rebase dev
git push origin master
View breeze-EntityQuery-allitems.js
breeze.EntityQuery
.from(contactType.defaultResourceName)
.using(entityManager)
.execute()
.then(function (response) {
var results = response.results;
// write results > div
if (results && results.length) {
var message = '';
for (var index = 0; index < results.length; index++) {
@andrewconnell
andrewconnell / breeze_get_item.js
Last active Aug 14, 2019
Blog Post: BreezeJS Makes Client-Side SharePoint 2013 REST Development a… BREEZE!
View breeze_get_item.js
breeze.EntityQuery
.from(contactType.defaultResourceName)
.where('Id', 'eq', 1)
.using(entityManager)
.execute()
.then(function (data) {
var message = data.entity.FirstName
+ ' ' + data.entity.Title
+ ' (' + data.entity.Email + ')';
jQuery("#results").html(message);
You can’t perform that action at this time.