Skip to content

Instantly share code, notes, and snippets.

View hdr1001's full-sized avatar
🤓

Hans de Rooij hdr1001

🤓
View GitHub Profile
➡️ GLEIF API using cURL
➡️ A quick first check to validate if cURL is installed
curl --version
➡️ Just a quick check if the Internet can be reached
curl https://github.com
➡️ Verify the version of jq installed (if not, sudo apt install jq)
jq --version
@hdr1001
hdr1001 / dnbDpl_cURL
Last active June 26, 2022 19:05
D&B Direct+ using cURL
➡️ D&B Direct+ using cURL
➡️ A quick first check to validate if cURL is installed
curl --version
➡️ Just a quick check if the public Internet can be reached
curl https://directplus.documentation.dnb.com
➡️ For generating an authentication token base64 is needed. Check:
base64 --version
@hdr1001
hdr1001 / SqlHubMatches
Created May 31, 2022 11:28
SQL for retrieving the matches made using my API Hub (v4) front-end
SELECT
id,
inq_det ->> 'name' AS name_in,
inq_det -> 'address' -> 'streetAddressLine' ->> 'line1' AS adr_in,
inq_det -> 'address' ->> 'postalCode' AS postalcode_in,
inq_det -> 'address' ->> 'addressLocality' AS city_in,
inq_det ->> 'telephoneNumber' AS tel_in,
cand_sel -> 'organization' ->> 'primaryName' AS name_out,
cand_sel -> 'organization' -> 'tradeStyleNames' -> 0 ->> 'name' AS tradestyle_out,
cand_sel -> 'organization' -> 'primaryAddress' -> 'streetAddress' ->> 'line1' AS adr_out,
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
sudo sh -c 'echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'
sudo apt install pgadmin4
@hdr1001
hdr1001 / InstDockerCompose
Created December 16, 2021 18:38
Docker Compose install on Ubuntu (https://dockr.ly/3Ff16jG)
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
@hdr1001
hdr1001 / instDockerU2210
Created December 16, 2021 07:38
Docker install on Ubuntu (https://dockr.ly/3ywr2or)
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
@hdr1001
hdr1001 / ffmpeg4gif
Created December 13, 2021 21:02
Use ffmpeg to create a gif
ffmpeg -i 'Screencast 2021-12-12 21:08:30.mp4' -r 15 -vf "scale=iw/1.5:ih/1.5,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -ss 00:00:05 -to 00:00:25 conky6.gif
@hdr1001
hdr1001 / dotConkyrc
Created December 13, 2021 20:47
My .conkyrc file for my AMD Ryzen 5900X and Gigabyte B550 Vision D-P combo
conky.config = {
--alignment tl
alignment = 'top_right',
background = false,
border_inner_margin = 0,
border_width = 0,
default_color = 'FFFFFF',
default_outline_color = 'black',
default_shade_color = 'black',
double_buffer = true,
@hdr1001
hdr1001 / aGist.txt
Last active September 12, 2020 20:38
Nonsense gist for inclusion in HTML5 file
This is an interesting gist for inclusion in an HTML5
file. Easy to create, easy to edit. Publicly available
on the Internet. Hosted by GitHub.
@hdr1001
hdr1001 / Git commit and push
Created May 28, 2020 20:37
Git commit & push
git add .
git commit -m "Converted minimal React app to UI for API Hub app"
git push