Skip to content

Instantly share code, notes, and snippets.

@milannankov
milannankov / index.js
Last active November 7, 2018 05:52
Serverless Backend for Data Transformation (Part 1) - index.js
module.exports = function (context, req) {
context.log('JavaScript HTTP trigger function processed a request.');
if (req.query.name || (req.body && req.body.name)) {
context.res = {
// status: 200, /** Defaults to 200 **/
body: "Hello " + (req.query.name || req.body.name)
};
}
else {
### Keybase proof
I hereby claim:
* I am milannankov on github.
* I am milannankov (https://keybase.io/milannankov) on keybase.
* I have a public key ASANqnluzTegcVZo4GrSrQ2c8T6esGvsGjNnwZFtNwNX9go
To claim this, I am signing this object:
@milannankov
milannankov / easy.controller.js
Last active April 23, 2024 18:10
Using Kendo UI in SAP UI5 Applications
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/model/json/JSONModel",
], function (Controller, JSONModel) {
"use strict";
return Controller.extend("simple-app.controller.View1", {
onAfterRendering: function () {
var colorPickerId = this.byId("colorPicker").sId;
@milannankov
milannankov / Gruntfile.js
Last active February 24, 2019 13:19
Developing SAPUI5 Applications with Visual Studio Code - Snippets
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
connect: {
options: {
port: 8080,
hostname: '*'
@milannankov
milannankov / App-updated.ts
Last active February 9, 2018 06:40
Kendo React Wrappers - Resolving Error "The node to be removed is not a child of this node"
render() {
return (
<div className="app">
<div><button onClick={this.onButtonClicked}>Toggle</button></div>
{/* Conditionally show Kendo DropDownList */}
{this.state.showList &&
<div> {/* Wrap the component in a div element */}
<DropDownList dataSource={["One", "Two", "Three"]} />
</div>
}
@milannankov
milannankov / index.html
Created December 12, 2017 14:25
Add New Item to Kendo MultiSelect on Enter
<div id="example">
<div>
<h4>Choose products</h4>
<select id="products" style="width: 100%;"></select>
</div>
<script>
$(document).ready(function () {
@milannankov
milannankov / index.js
Last active November 19, 2017 15:45
Azure Table Storage - Query by Reverse Chronological Order with JavaScript
const uuidv4 = require('uuid/v4');
const moment = require('moment');
module.exports = function (context, req) {
// Save Table storage entry
context.bindings.tableEntry = {
PartitionKey: 'myPartition',
RowKey: GenerateKey(),
Text: "sample"
@milannankov
milannankov / view.css
Last active August 23, 2017 16:17
Code Bites: Label Shadows for NativeScript on Android
.button {
height: 34;
background-color: #aeea00;
color: #36505E;
border-color: #80B808;
border-width: 0.5;
border-top-width: 0;
border-bottom-width: 0;
vertical-align: center;
horizontal-align: stretch;
@milannankov
milannankov / scenario1.xml
Last active July 29, 2017 21:16
AzApp Service Warmup
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type='text/xsl' href='freb.xsl'?>
<!-- saved from url=(0014)about:internet -->
<failedRequest url="http://main-warm.azurewebsites.net:80/warmup-cache.php"
siteId="1354661621"
appPoolId="main-warm__8e84"
processId="4292"
verb="GET"
remoteUserName=""
userName=""
@milannankov
milannankov / arm.ps1
Last active March 16, 2017 08:39
Code Bites: Azure SQL Server Geo-Replication With PowerShell - ASM vs. ARM
$dbUser = "tester"
$dbPass = "myP@ssword"
$primaryServerName = "serverName"
$primaryDbName = "dbName"
$resourceGroupName = "groupName"
$secondaryServerName = "secondary" + (Get-Random)
$existingDb = Get-AzureRmSqlDatabase -ServerName $primaryServerName -DatabaseName $primaryDbName `
-ResourceGroupName $resourceGroupName