Skip to content

Instantly share code, notes, and snippets.

@drushman
drushman / eck.yaml
Last active September 6, 2022 06:27
asyncapi: 2.4.0
info:
title: Eck service
version: 1.0.0
description: Eck service events
channels:
domain-users.account.custom-fields.updated:
subscribe:
tags:
- name: eck-service
{
"openapi": "3.0.0", "paths": {
"\/reindex": {
"post": {
"parameters": [],
"summary": "Reindex portal.",
"responses": {"200": []},
"tags": [{"name": "portal-index", "description": "| "}]
}
},
{
"paths": {
"/commit": {
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
swagger: "2.0"
info:
description: ""
version: "1.0.0"
title: "Policy API"
host: "api.go1.co"
basePath: "/policy"
tags:
- name: "Policy Item"
description: "Policy API"
#### Why we should move to Kafka
* Stream data from many of data source (mysql, oracle) - Connector
* Many of big company being use it. (Better for developer career)
* Support streaming that enables transform data, or process data with pipeline
* Very simple just has `Topic`
* Messages are stored that enables debugging or simple event sourcing
* A new approach to deal with big data when company growing with more data
* MapReduce
* DataPipeline
program ageofuser(input,output);
var
i:integer;
n:integer;
begin
writeln('Please type n');
readln(n);
i := 1;
while i < n do
@drushman
drushman / serverless.yaml
Created October 24, 2016 08:54 — forked from codepreneur/serverless.yaml
serverless framework/cli configuration file
service: "sadiavasio"
provider: "aws"
functions:
sadiavas:
handler: "index.graphql"
include:
- blog/
events:
- http:
path: "blog/graphql"
<?php
/**
* Get entities references of EntityDrupalWrapper
*
* For example: we have entity A with ref to B (on field_ref_b) and on entity B we have other ref to C (on field_ref_c)
*
* - Let get all entities B that entity A1 referenced
* get_entities_references($w_a, 'field_ref_b');
* - Let get all entities C that entity A1 referenced
if (isset($page['widgets'])) {
$items = array();
// Get blocks in widgets region.
foreach ($page['widgets'] as $context_block) {
if (isset($context_block['#block']) && $block = $context_block['#block']) {
$block_html_id = drupal_html_id('lms-block-' . $block->module . '-' . $block->delta);
$block_html_id = substr($block_html_id, 4);
$items[] = l($block->subject, '', array('fragment' => $block_html_id, 'external' => TRUE));
}
}
$view = new view();
$view->name = 'tutor_profile';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'users';
$view->human_name = 'Tutor profile';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */