Skip to content

Instantly share code, notes, and snippets.

View ranhsd's full-sized avatar

Ran Hassid ranhsd

View GitHub Profile
@ranhsd
ranhsd / expand.xml
Created November 23, 2019 19:44
odata expand example
<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xml:base="http://localhost:8080/odata/">
<id>http://example.org/odata/CarModels(1L)</id>
<title type="text">CarModels</title>
<updated>2019-04-07T11:33:38.467-03:00</updated>
<category term="default.CarModel"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
package com.company.testmta.service;
import java.sql.Connection;
import java.util.List;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
<?xml version='1.0' encoding='UTF-8'?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="todo">
<EntityType Name="Task">
<Key>
<PropertyRef Name="id"/>
</Key>
<Property Name="id" Type="Edm.String" Nullable="false" MaxLength="10"/>
<Property Name="title" Type="Edm.String" Nullable="false" MaxLength="100"/>
id taskId content
1 1 First task subtask
2 1 First task second sub task
3 2 Second task subtask
id title note
1 my first task this is my first task
2 my second task my second task
{
"format_version": 1,
"imports":
[ {
"target_table": "todo.Task",
"source_data" : { "data_type" : "CSV", "file_name" : "tasks.csv", "has_header" : true },
"import_settings" : { "import_columns" : [ "id", "title","note" ] },
"column_mappings" : { "id" : 1, "title" : 2, "note" : 3 }
},
{
package com.company.testmta.service;
import java.sql.Connection;
import java.util.List;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;
@ranhsd
ranhsd / kube-lego-deployment.yml
Last active June 11, 2017 05:36
kube-lego-deployment.yml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kube-lego
namespace: kube-lego
spec:
replicas: 1
template:
metadata:
labels:
@ranhsd
ranhsd / parse-server-ingress.yml
Last active June 11, 2017 08:58
parse-server-ingress.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: my-parse-app-ingress
annotations:
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "gce"
spec:
tls:
- hosts:
@ranhsd
ranhsd / parse-server-service-nodeport.yml
Created June 8, 2017 08:27
parse-server-service-nodeport.yml
apiVersion: v1
kind: Service
metadata:
name: my-parse-app-service
spec:
ports:
- port: 80
targetPort: 1337
protocol: TCP
name: my-parse-app-service