Skip to content

Instantly share code, notes, and snippets.

@george124816
Created May 18, 2022 22:42
Show Gist options
  • Save george124816/ccb42aac23374c38dbd734ae79a0eeb1 to your computer and use it in GitHub Desktop.
Save george124816/ccb42aac23374c38dbd734ae79a0eeb1 to your computer and use it in GitHub Desktop.
Some org mode and babel execution

Example Org Mode with Org Babel

Variables

echo "https://api.ipify.org"

Make first request

GET :host
Content-Type: application/json

Run some query on database

CREATE TABLE Persons (
    PersonID int,
    LastName varchar(255),
    FirstName varchar(255),
    Address varchar(255),
    City varchar(255)
);
CREATE TABLE
INSERT INTO Persons (PersonID, LastName, FirstName, Address, City)
            VALUES (1, 'da Sousa', 'Fulano', 'Rua dos Anzois', 'Rio de Janeiro'),
                   (2, 'de Tal', 'Ciclano', 'Avenida dos Outros', 'São Paulo');
INSERT 0 2
SELECT * FROM Persons;
personidlastnamefirstnameaddresscity
1da SousaFulanoRua dos AnzoisRio de Janeiro
2de TalCiclanoAvenida dos OutrosSão Paulo
IO.puts("some code execution")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment