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/python3.8 | |
import subprocess | |
import getpass | |
import json | |
import argparse | |
import os | |
parser = argparse.ArgumentParser(description='Create new Client for ArgoCD') | |
parser.add_argument('-realm', required=True, help='realm to change') |
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
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: code-server | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: code-server |
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
module Fluent | |
class NewKubernetesDockerTailInput < NewTailInput | |
Plugin.register_input("kubernetes_docker_tail", self) | |
desc 'The file to read the container name' | |
config_param :container_name_file, :string | |
def initialize | |
super |
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
#cloud-config | |
write-files: | |
- path: /opt/bin/wupiao | |
permissions: '0755' | |
content: | | |
#!/bin/bash | |
# [w]ait [u]ntil [p]ort [i]s [a]ctually [o]pen | |
[ -n "$1" ] && [ -n "$2" ] && while ! curl --output /dev/null \ | |
--silent --head --fail \ | |
http://${1}:${2}; do sleep 1 && echo -n .; done; |
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
function insertValues(data, value, dimension, metric, domain) { | |
var defaults = {}; | |
domain.forEach(function(item) { | |
var v = {}; | |
v[dimension] = item; | |
v[metric] = value; | |
defaults[item] = v; | |
}); | |
_.each(data, function(item) { |
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
public class RestTraversalMain { | |
/** | |
* running neo4j community 1.5.2 | |
* Matrix Example -> Node 391 is Neo | |
* <p/> | |
* Throws Exception: | |
* <p/> | |
* Exception in thread "main" java.lang.NullPointerException |
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
{ | |
{ | |
/** | |
* follow list of nodes with relations BOTH "KNOWS" and OUT "CODED_BY" | |
*/ | |
val erg = startNodes.doTraverse[Test_MatrixBase](follow -- "KNOWS" ->- "CODED_BY") { | |
/** | |
* prune evaluator is Java Script and returns false |
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
trait MatrixBase { | |
val name: String | |
val profession: String | |
} | |
case class Matrix(name: String, profession: String) extends MatrixBase | |
case class NonMatrix(name: String, profession: String) extends MatrixBase | |
/** |
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
case class MatrixNodeProperties(name: String, profession: String) | |
object CreateAndDeleteNodes extends App with Rest with SimpleWebResourceProvider { | |
// base location of Neo4j server instance | |
override def baseUriAsString = "http://localhost:7474/db/data/" | |
// all subsequent REST calls should use JSON notation | |
override val mediaType = Some(MediaType.APPLICATION_JSON) |
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
rest { | |
implicit s => | |
// defining note names and profession | |
val nodes = ("Mr. Andersson", "Hacker") :: | |
("Morpheus", "Hacker") :: | |
("Trinity", "Hacker") :: | |
("Cypher", "Hacker") :: | |
("Agent Smith", "Program") :: | |
("The Architect", "Whatever") :: Nil |
NewerOlder