Skip to content

Instantly share code, notes, and snippets.

View BetimBeja's full-sized avatar
❄️
Always improving

Betim Beja BetimBeja

❄️
Always improving
View GitHub Profile
@BetimBeja
BetimBeja / pcf-stalker.ps1
Created April 26, 2023 07:18
track the changes for pcf-scripts and pcf-start NPM packages
If(!(Test-Path "./PCF")){
New-Item "./PCF" -ItemType Directory
}
Set-Location "./PCF"
If(!(Test-Path "./.git")){
& git init
}
@BetimBeja
BetimBeja / SyncFork.ps1
Last active December 9, 2021 21:31
Synchronize DynamicsValue FakeXrmEasy Repositories
param(
[string]$folder,
[bool]$mainOnly = $false
)
cd $folder
Write-Host "Syncing folder " $folder
$branch = & git branch --show-current
$changes = & git diff --shortstat
@BetimBeja
BetimBeja / modify-flags.js
Created May 7, 2021 12:47
Script to override pcfAllowLookup flag
const fs = require('fs');
const flagsPath = 'pcf-scripts/featureflags.json';
const flags = require(flagsPath);
flags.pcfAllowLookup = 'on';
fs.writeFile(
require.resolve(flagsPath),
JSON.stringify(flags, null, 2),
function writeJSON(err) {
@BetimBeja
BetimBeja / release-pipeline-job.yml
Created September 4, 2019 07:07
A sample job snippet for azure pipelines to keep GitHub forks synchronized. Assumes you have created a secret GitHub_Token variable in your pipeline
steps:
- bash: |
git clone https://betimbeja:${GitHub_Token}@github.com/BetimBeja/fake-xrm-easy
cd fake-xrm-easy
git remote add upstream https://github.com/jordimontana82/fake-xrm-easy
git fetch upstream
git merge upstream/master
git push
displayName: 'Synchronize with jordimontana82/fake-xrm-easy'
env:
var result = `<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
@BetimBeja
BetimBeja / Program.cs
Created January 9, 2019 07:55
Simple serialization and deserialization of an XRM Entity with XrmEntitySerializer
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Tooling.Connector;
using Newtonsoft.Json;
using System;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.ServiceModel;