Skip to content

Instantly share code, notes, and snippets.

View narcoticfresh's full-sized avatar

Dario Nuevo narcoticfresh

  • Swisscom AG
  • Bern, Switzerland
View GitHub Profile
@narcoticfresh
narcoticfresh / SampleObject.java
Created February 27, 2025 08:48
sampleObject without library
/*
* TEST
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
@narcoticfresh
narcoticfresh / SampleObject.java
Created February 27, 2025 08:43
full sample testobject
/*
* TEST
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
@narcoticfresh
narcoticfresh / test.lua
Created October 5, 2023 10:13
check lua regex
local pathToCheck = "/graph/v1.0/users/a90b/photo/$valuesd"
local pattern = "/graph/v1.0/users/([0-9a-zA-Z-]+)/photo/$value$";
if pathToCheck:match(pattern) then
print("YES")
else
print("no")
end
@narcoticfresh
narcoticfresh / Dockerfile
Last active January 18, 2019 03:26
Save haproxy.cfg and copy to location /home/docker on your swarm manager, build the Dockerfile tagged as haproxy-local and deploy the compose file as stack "proxy"
# build tagged as "haproxy-local"
FROM alpine:3.6
ARG TAG
LABEL TAG=${TAG}
RUN set -ex;\
apk update;\
apk upgrade;\
apk add haproxy ca-certificates curl bash;\
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45118 [14/Jul/2017:07:33:44.816] tcpFE_88 tcpFE_88/<NOSRV> -1/-1/0 0 SC 0/0/0/0/0 0/0
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45120 [14/Jul/2017:07:33:44.825] tcpFE_88 proxy_nginx-be80/proxy_nginx 1/0/0 850 -- 0/0/0/0/0 0/0
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45122 [14/Jul/2017:07:33:44.833] tcpFE_88 proxy_nginx-be80/proxy_nginx 1/0/1 850 -- 0/0/0/0/0 0/0
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45124 [14/Jul/2017:07:33:44.841] tcpFE_88 proxy_nginx-be80/proxy_nginx 1/0/2 850 -- 0/0/0/0/0 0/0
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45126 [14/Jul/2017:07:33:44.853] tcpFE_88 proxy_nginx-be80/proxy_nginx 1/0/1 850 -- 0/0/0/0/0 0/0
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45128 [14/Jul/2017:07:33:44.862] tcpFE_88 proxy_nginx-be80/proxy_nginx 1/0/1 850 -- 0/0/0/0/0 0/0
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45130 [14/Jul/2017:07:33:44.871] tcpFE_88 proxy_nginx-be80/proxy_nginx 1/0/1 850 -- 0/0/0/0/0 0/0
2017/07/14 07:33:44 HAPRoxy: 10.255.0.2:45132 [14/Jul/2017:07:33:44.87
{"title":"Financing consultation","description":"Financing consultation details","type":"object","properties":{"id":{"title":"ID","description":"Unique identifier","type":"string","format":"custom_id"},"displayName":{"title":"display name","description":"Humanreable string representing the name o","type":"string","minLength":1},"creationDate":{"title":"Datetime of the creation","description":"Date and time of the creation of this document","type":"string","format":"date-time","minLength":1},"modifiedDate":{"title":"Datetime of the last modification date","description":"Date and time of the last time this document was changed","type":["string","null"],"format":"date-time"},"customer":{"title":"Customer","type":"object","properties":{"id":{"title":"ID","description":"Unique identifier","type":["string","null"]},"firstName":{"title":"","description":"@todo replace me","type":["string","null"]},"lastName":{"title":"","description":"@todo replace me","type":["string","null"]},"maritalStatusDate":{"title":"","descr
@narcoticfresh
narcoticfresh / CollectionsTest.php
Created June 22, 2016 10:48
add createFromMerge
<?php
namespace Doctrine\ODM\MongoDB\Tests\Functional;
use Documents\Bars\Bar;
use Documents\Bars\Location;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
class CollectionsTest extends \Doctrine\ODM\MongoDB\Tests\BaseTest
{