Skip to content

Instantly share code, notes, and snippets.


Ville Rantala vjrantal

  • Microsoft
  • Finland
View GitHub Profile
vjrantal / permissions-for-default-service-account.yaml
Created August 6, 2019 10:02
Configuration of a privileged role and role binding that allows a test application in a CI to run
View permissions-for-default-service-account.yaml
kind: ClusterRole
name: privileged-role
- apiGroups: [""]
resources: ["secrets", "pods", "pods/log", "services"]
verbs: ["get", "watch", "list", "create", "delete"]
- apiGroups: ["batch"]
resources: ["jobs"]
vjrantal /
Created August 2, 2019 09:07
python3.5 command removed from python:3.7.4 image
$ sudo docker run -it python:3.7.3 /bin/bash
Digest: sha256:9e0b4f32487ca1863b45383420b8db77990debae748e2e875d2f86fa9510d4a5
Status: Downloaded newer image for python:3.7.3
root@b669a8b8fe51:/# python3.5
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
$ sudo docker run -it python:3.7.4 /bin/bash
import os
def test_function():
if os.environ.get('SOMETHING_THAT_DOES_NOT_EXIST'):
tail = ''
if tail:
print('Not printed')
vjrantal / adx.csl
Last active May 16, 2019 05:42
Update policy sample to expand JSON arrays (note that below payload sample could also be ingested directly using multijson format - see multijson.csl)
View adx.csl
// Create staging table that holds the JSON data as it comes via the Event Hubs.
// If the staging table is not needed, a zero retention policy can be set using:
.create table Staging (Data: dynamic)
// Create the table for the expanded messages. See here for an example what kind of input
// could be mapped to a table like this:
.create table Messages (ApplicationUri: string, DisplayName: string, Value: real, NodeId: string, SourceTimestamp: datetime)
vjrantal / function.json
Last active August 29, 2017 05:23
Streaming Node.js function
View function.json
"bindings": [
"type": "blobTrigger",
"name": "input",
"direction": "in",
"dataType": "stream",
"path": "test-input-node/{name}"
vjrantal / output.txt
Created March 13, 2015 11:52
Output from a cordova-parametic run when using the wp8 platform
View output.txt
C:\Users\vjrantal\Software\cordova-paramedic>npm run test-wp8
> cordova-paramedic@0.0.8 test-wp8 C:\Users\vjrantal\Software\cordova-paramedic
> node main.js --platform wp8 --plugin ../spec/testable-plugin/
cordova-paramedic :: checking cordova version
cordova-paramedic :: creating temp project
Creating a new cordova project with name "HelloCordova" and id "io.cordova.hellocordova" at location "C:\Users\vjrantal\Software\cordova-paramedic\tmp"
cordova-paramedic :: installing ../spec/testable-plugin/
vjrantal / plugin.xml
Last active August 29, 2015 14:16
Clips from a plugin.xml file
View plugin.xml
<!-- Top level plugin element omitted -->
<engine name="cordova" version=">=3.1.0" />
<engine name="cordova-windows8" version=">=3.8.0" />
<js-module src="www/AllJoyn.js" name="AllJoyn">
<clobbers target="AllJoyn" />
vjrantal / npm-run-protractor
Last active August 29, 2015 14:14
WebDriver example run output of angular-seed tests on Windows Phone
View npm-run-protractor
$ npm run protractor
> angular-seed@0.0.0 preprotractor /Users/vjrantal/Software/angular-seed
> npm run update-webdriver
> angular-seed@0.0.0 preupdate-webdriver /Users/vjrantal/Software/angular-seed
> npm install
npm WARN package.json karma-firefox-launcher@0.1.4 No README data
vjrantal / karma.conf.js
Created February 5, 2015 11:49
WebDriver configuration example to run angular-seed tests on Windows Phone
View karma.conf.js
diff --git a/karma.conf.js b/karma.conf.js
index 44bb29f..8d47576 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -15,11 +15,28 @@ module.exports = function(config){
frameworks: ['jasmine'],
- browsers : ['Chrome'],
+ hostname: '',