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
--On Master | |
CREATE TABLE test (id SERIAL PRIMARY KEY, msg TEXT NOT NULL); | |
CREATE PUBLICATION testpub FOR TABLE test | |
--On Replica | |
CREATE TABLE test (id SERIAL PRIMARY KEY, msg TEXT NOT NULL); | |
CREATE SUBSCRIPTION testsub CONNECTION 'host=<host> user=<user> password=<test>' PUBLICATION testpub; | |
CREATE OR REPLACE FUNCTION notify_channel() RETURNS trigger AS $$ | |
BEGIN | |
RAISE LOG 'Notify Triggered'; |
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 java.awt.datatransfer.UnsupportedFlavorException; | |
import java.io.*; | |
import java.awt.Toolkit; | |
import java.awt.datatransfer.Clipboard; | |
import java.awt.datatransfer.DataFlavor; | |
import java.util.Arrays; | |
import java.util.Optional; | |
public class Main { |
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 fixMdlFields(element, validate) { | |
element.querySelectorAll("input, textarea").forEach((el) => { | |
let parentClasses = el.parentNode.classList; | |
if (el.disabled) { | |
parentClasses.add("is-disabled"); | |
} else { | |
parentClasses.remove("is-disabled"); | |
} | |
if (el.readOnly) { | |
parentClasses.add("is-readonly"); |
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 main | |
import ( | |
"io/ioutil" | |
"log" | |
"time" | |
config "github.com/micro/go-config" | |
) |
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
syntax = "proto3"; | |
option go_package = "myservice"; | |
message MyMessage { | |
uint32 id = 1; | |
} |
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
#!/bin/sh | |
protoc -I. --micro_out=. my.srv.opps/proto/opps.proto | |
protoc -I. --micro_out=. my.another.srv.opps/proto/opps.proto |