Skip to content

Instantly share code, notes, and snippets.

View r4hulp's full-sized avatar
🎯
Focusing

Rahul P r4hulp

🎯
Focusing
View GitHub Profile
@r4hulp
r4hulp / Global.asax.cs
Created December 29, 2017 07:33
Registering module
//In Global.asax.cs
builder.RegisterModule(new AzureModule(Assembly.GetExecutingAssembly()));
var store = new TableBotDataStore(ConfigurationManager.ConnectionStrings["StorageConnectionString"].ConnectionString);
builder.Register(c => store)
.Keyed<IBotDataStore<BotData>>(AzureModule.Key_DataStore)
.AsSelf()
.SingleInstance();
@r4hulp
r4hulp / add-travis-to-git-repo.bat
Created June 9, 2017 17:16
Adding Travis.yml to repository
git add .
git commit -m "added travis.yml"
git push origin master
@r4hulp
r4hulp / firebase.json
Created June 9, 2017 15:41
Firebase configuration
{
"hosting": {
"public": "_site",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
@r4hulp
r4hulp / firebase-login.bat
Created June 9, 2017 15:27
Firebase login
firebase login
@r4hulp
r4hulp / install-firebase-tools.bat
Created June 9, 2017 15:13
Install Firebase tools
npm install -g firebase-tools
@r4hulp
r4hulp / Jekyll-to-Github.bat
Created June 9, 2017 15:06
Jekyll to Github repo.
git init
git add .
git commit -m "First commit"
git remote add origin {remote_repository_url}
git remote -v
git push origin master
@r4hulp
r4hulp / install-jekyll-chocolatey.ps
Created May 29, 2017 15:40
Install Jekyll using Chocolatey
choco install ruby -y
gem install bundler
gem install jekyll
@r4hulp
r4hulp / d365-app-user-poc.cs
Last active May 27, 2017 17:00
Headless communcation to Dynamics CRM using application user
/// <summary>
/// Headless communication to dynamics CRM using application user.
/// More information at : http://www.wrapcode.com/server-authentication-dynamics-crm/
/// This is just a sample code, there are way better ways to achieve the same. Did not want to spend much time on code snippet.
/// </summary>
public static async Task HeadlessAuthenticationPOC()
{
var clientCreds = new ClientCredential("{AZURE_AD_APP_ID}", "{AZURE_AD_APP_SECRET}");
AuthenticationResult authResult = null;
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'electron' ]
2 info using npm@3.10.8
3 info using node@v7.0.0
4 verbose run-script [ 'preelectron', 'electron', 'postelectron' ]
5 info lifecycle ng2-electron@0.1.0~preelectron: ng2-electron@0.1.0
6 silly lifecycle ng2-electron@0.1.0~preelectron: no script for preelectron, continuing
D:\Angular2\November2016\reboot-cli>npm install -g angular-cli@latest
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail o
n node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible
. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher
to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie h
ttps://nodesecurity.io/advisories/130
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher
to avoid a RegExp DoS issue