Skip to content

Instantly share code, notes, and snippets.

@karreiro
karreiro / a.md
Last active April 26, 2023 14:47

Submition workflow for theme developers

sequenceDiagram
    %% participants

    participant Theme developer
    participant Shopify/theme-store
    participant Shopify/shopify
    
@karreiro
karreiro / Convert .mov or .MP4 to .gif.md
Created October 27, 2022 11:11 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

require "httparty"
require "benchmark"
# ==============================================================================
YOUR_STORE_URL = "https://shop1.shopify.bulk7.guilherme-carreiro.eu.spin.dev"
YOUR_CUSTOM_APP_PASSWORD = "shpat_11111111111111111"
# ==============================================================================
@karreiro
karreiro / new-file.dmn
Last active April 8, 2021 09:20
new-file.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_BC1E0AC4-C43A-4D3C-B9CC-407162F8B12E" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" id="_CA72796F-2B76-4706-B5D5-105FEA198381" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_BC1E0AC4-C43A-4D3C-B9CC-407162F8B12E">
<dmn:extensionElements/>
<dmn:decision id="_9CD54448-B609-4424-AF6E-4F15708F60DF" name="Decision-1">
<dmn:extensionElements/>
<dmn:variable id="_87A8BCF8-205F-4CD3-AA53-635FDB65A752" name="Decision-1"/>
</dmn:decision>
<dmn:decision id="_681D572F-5EF0-4B43-98B0-0E1D1EC41FF9" name="Decision-3">
<dmn:extensionElements/>
<dmn:variable id="_6CB224C3-9E97-4016-9E6B-8E614009118F" name="Decision-3"/>
@karreiro
karreiro / new-file.bpmn
Last active April 8, 2021 09:18
new-file.bpmn
<bpmn2:definitions xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" xmlns:xsi="xsi" id="_T6mKkHp5EDmI39xGYzfYVw" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
<bpmn2:process id="new_file" drools:packageName="com.example" drools:version="1.0" drools:adHoc="false" name="new-file" isExecutable="true" processType="Public">
<bpmn2:sequenceFlow id="_F3566959-6CDF-485A-85A4-EF7C6C280645" sourceRef="_BC54AE86-FEEC-44EB-933B-D02674202E11" targetRef="_14AF4365-82C1
@karreiro
karreiro / EmbeddedDataTable.dmn
Created June 10, 2020 21:46
EmbeddedDataTable.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_FC75913D-81CF-49A3-A6F4-A56FB341C574" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" id="_72BA4308-069E-4F8D-8608-D4FDDFA5A1A5" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_FC75913D-81CF-49A3-A6F4-A56FB341C574">
<dmn:extensionElements/>
<dmn:itemDefinition id="_B8E3371A-9B39-4914-8C74-C7C0A8C808FB" name="tLoanProduct" isCollection="false">
<dmn:itemComponent id="_D849B756-2A5A-4000-B1EA-A2274AD15659" name="lenderName" isCollection="false">
<dmn:typeRef>string</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_C9E5C508-D4FA-42E2-AA56-39A3DBB3D127" name="rate" isCollection="false">
<dmn:typeRef
@karreiro
karreiro / EmbeddedDataTable.dmn
Created June 10, 2020 21:44
EmbeddedDataTable.dmn
<dmn:definitions xmlns:dmn="http://www.omg.org/spec/DMN/20180521/MODEL/" xmlns="https://kiegroup.org/dmn/_FC75913D-81CF-49A3-A6F4-A56FB341C574" xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/" xmlns:kie="http://www.drools.org/kie/dmn/1.2" xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/" xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/" xmlns:feel="http://www.omg.org/spec/DMN/20180521/FEEL/" id="_72BA4308-069E-4F8D-8608-D4FDDFA5A1A5" name="new-file" typeLanguage="http://www.omg.org/spec/DMN/20180521/FEEL/" namespace="https://kiegroup.org/dmn/_FC75913D-81CF-49A3-A6F4-A56FB341C574">
<dmn:extensionElements/>
<dmn:itemDefinition id="_B8E3371A-9B39-4914-8C74-C7C0A8C808FB" name="tLoanProduct" isCollection="false">
<dmn:itemComponent id="_D849B756-2A5A-4000-B1EA-A2274AD15659" name="lenderName" isCollection="false">
<dmn:typeRef>string</dmn:typeRef>
</dmn:itemComponent>
<dmn:itemComponent id="_C9E5C508-D4FA-42E2-AA56-39A3DBB3D127" name="rate" isCollection="false">
<dmn:typeRef
func main() {
// Set up a connection to the server.
conn, err := grpc.Dial(address, grpc.WithInsecure())
if err != nil {
log.Fatalf("did not connect: %v", err)
}
defer conn.Close()
c := pb.NewGreeterClient(conn)
func main() {
// Set up a connection to the server.
conn, err := grpc.Dial(address, grpc.WithInsecure())
if err != nil {
log.Fatalf("did not connect: %v", err)
}
defer conn.Close()
c := pb.NewGreeterClient(conn)
static class GreeterImpl extends GreeterGrpc.GreeterImplBase {
@Override
public void sayHello(HelloRequest req,
StreamObserver<HelloReply> responseObserver) {
HelloReply reply = HelloReply.newBuilder().setMessage("Hello " + req.getName()).build();
responseObserver.onNext(reply);
responseObserver.onCompleted();
}