This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.servlet.* | |
import groovy.servlet.* | |
@Grab(group='org.eclipse.jetty.aggregate', module='jetty-all', version='7.6.15.v20140411') | |
def startJetty() { | |
def server = new Server(8080) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.* | |
// NOTE: the prefix / was removed to help the recursion, this step could be done before starting of it can be part of the first recursion | |
def data = [ | |
"name", | |
"category", | |
"context/setting", | |
"context/start_time", | |
"content(3)/data/origin", | |
"content(3)/data/events(1)/time", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = []; | |
var dataCount = 20; | |
var startTime = +new Date(); | |
var categories = ['14/2/2020']; | |
var types = [ | |
{name: 'Offline', color: 'red'}, | |
{name: 'Online', color: 'green'}, | |
]; | |
// Generate mock data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
if [ "$color_prompt" = yes ]; then | |
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \[\033[00m\]\[\033[32;1m\]\[\033[42m\]$(parse_git_branch)\[\033[00m\] $ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env groovy | |
// This works in Jenkinsfiles without approving any scripts. | |
class MyProfiler { | |
def timings | |
def dsl | |
MyProfiler(dsl) { | |
this.timings = [:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^((?:19|20)[0-9]{2})(?:(1[0-2]|0[1-9])(?:(3[0-1]|[1-2][0-9]|0[1-9])(?:([0-1][0-9]|2[0-3])(?:([0-5][0-9])(?:([0-5][0-9](?:\.[0-9]{1,4})?)?)?)?)?)?)?([+-](?:[0-1][0-9]|2[0-3])[0-5][0-9])?$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST \ | |
http://178.62.71.220:8080/rest/v1/template/ \ | |
-H 'Authorization: Basic Z3Vlc3Q6Z3Vlc3Q=' \ | |
-H 'Content-Type: application/xml' \ | |
-H 'Ehr-Session: sessionId:127.0.0.1-guest-1548250494478-1031674849-11061' \ | |
-d '<?xml version="1.0" encoding="utf-8"?> | |
<!--Operational template XML automatically generated by Ocean Template Designer Version 2.8.94Beta--> | |
<template xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.openehr.org/v1"> | |
<language> | |
<terminology_id> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mygrailsapp | |
import grails.converters.JSON | |
import org.springframework.security.authentication.AccountExpiredException | |
import org.springframework.security.authentication.CredentialsExpiredException | |
import org.springframework.security.authentication.DisabledException | |
import org.springframework.security.authentication.LockedException | |
import org.springframework.security.web.WebAttributes | |
import org.springframework.security.web.authentication.session.SessionAuthenticationException | |
import org.springframework.web.servlet.support.RequestContextUtils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Shadow 0dp */ | |
box-shadow: none; | |
/* Shadow 1dp */ | |
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20); | |
/* Shadow 2dp */ | |
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20); | |
/* Shadow 3dp */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BinaryTree { | |
def tmp // temporal expression | |
def value | |
def left | |
def right | |
def parent // null for root | |
String toString() | |
{ |
NewerOlder