Skip to content

Instantly share code, notes, and snippets.

View fabianwilliams-zz's full-sized avatar
🎯
Focusing

Fabian Williams fabianwilliams-zz

🎯
Focusing
View GitHub Profile
@fabianwilliams-zz
fabianwilliams-zz / golf_registerSPOPrincipaltoSP2013
Created October 10, 2014 15:15
SharePoint Hybrid Scripts for Identity Management
#you will need to set up a Trusted Authority in your ON Premises SP2013
#below takes SPO Principal Object and registers it with SP On Prem Root Web
$spoappprincipalID = (Get-MsolServicePrincipal -ServicePrincipalName $spoappid).ObjectID
$sponameidentifier = "$spoappprincipalID@$spocontextID"
$appPrincipal = Register-SPAppPrincipal -site $site.rootweb -nameIdentifier $sponameidentifier -displayName "SharePoint Online"
#you can verify this worked by running the POSH below
Get-SPAppPrincipal -site $site.rootweb -NameIdentifier $sponameidentifier | format-table -autosize -wrap
@fabianwilliams-zz
fabianwilliams-zz / JailBreakFromWAMS
Created June 26, 2015 23:18
WAMS datastructure included
MongoDB shell version: 3.0.4
connecting to: ds034208.mongolab.com:34208/FabianMongoLab
> db.JailBreak.find().pretty()
{
"_id" : ObjectId("558ddb8791bb5a9e249a55de"),
"Version" : null,
"CreatedAt" : [
NumberLong("635709569354081905"),
0
],
Steps to Accomplish Xamarin.Forms with Azure
Steps with Explanatory Notes
Section 1 - Create or Attach to a Windows Azure Mobile Service URI
1. Log into https://manage.windowsazure.com
2. Click on the option to create an Azure Mobile Service (WAMS) if the one you want to use does not exist otherwise just click on the one you will be using in this process. By default you get a ToDo Items Entity and Controller
3. Optional – Adjust your Data Objects(Entitys Add, Edit, etc)
4. Optional – Adjust your Controllers (CRUD-Q Capabilities)
5. Publish your WAMS URI back to Azure
//For Facebook
Strategy.prototype._convertProfileFields = function(profileFields) {
var map = {
'id': 'id',
'username': 'username',
'displayName': 'name',
'name': ['last_name', 'first_name', 'middle_name'],
'gender': 'gender',
'profileUrl': 'link',
'emails': 'email',
// Save the below in a .ps1 file and then execute on the offending computer
Remove-Item "$($env:APPDATA)\Microsoft\Web Server Extensions\Cache\*" -recurse -force
Remove-Item "$($env:USERPROFILE)\AppData\Local\Microsoft\WebsiteCache\*" -recurse -force
1. Navigate to the Directory you want your Project to be in
2. install -g express-generator
3. this will install Express Generator Globally on your system if it is not already installed
4. express projectNameHere
5. this creates a bunch of folders and files for you and will give you the scaffolding you need for your project
its install will include packages that may not be installed on your system and not in your packages.json file so
6. npm install
7. thats it. if you run npm start it will spin up your site
8. you can start to use and customize the app.js file typically i will switch the view engine to use ejs over jade
9. locate the line in app.js and change it from jade to ejs
@fabianwilliams-zz
fabianwilliams-zz / ITDevCon-Fabian-GraphAPI
Created September 20, 2016 01:02
For my session on Office Graph API & Delve, Unleash the Power
//Calls to graph Api from Postman for Demos
#Understanding the Graph Metadata Model
https://graph.microsoft.com/beta/$metadata
#Get Information about Users
https://graph.microsoft.com/v1.0/users/[email protected]
#Now try it with Beta
https://graph.microsoft.com/beta/users/[email protected]
https://graph.microsoft.com/beta/users/[email protected]
#Now try it and pull only certain properties
https://graph.microsoft.com/beta/users/[email protected]?$select=displayName,aboutMe,skills
@fabianwilliams-zz
fabianwilliams-zz / FabsDockerExperience
Last active July 14, 2017 19:55
Working with Docker -- Just Tips and Tricks Stuff
Docker
docker-machine ls (this list all the machine that you have locally)
docker-machine start [machine name]
docker-machine stop [machine name]
docker-machine env [machine name]
docker-machine ip [machine name]
docker-machine status [machine name]
docker ps (this list all containers)
@fabianwilliams-zz
fabianwilliams-zz / Create Fabian SpekerEvals Docker WebAPI
Created July 6, 2017 14:34
This Docker Compose file will pull down my image from Dockerhub and create you the WebAPI backed by MSSQL Linux
version: "3"
services:
web:
image: "fabianwilliams/fabsevalswebapi"
build: .
ports:
- "8000:80"
depends_on:
- db
db: