Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
  • create your account in restdb.io
  • creat a database
  • enter to your databae and save the base url

image

image

  • enable the developer mode
#launch agent
bash /log-agent.sh > /dev/null 2>&1 &
#launch java app
java -jar ....

convert_ascii_to_html_entities.sh

for ARGUMENT in "$@"
do
   KEY=$(echo $ARGUMENT | cut -f1 -d=)

   KEY_LENGTH=${#KEY}
   VALUE="${ARGUMENT:$KEY_LENGTH+1}"
@jrichardsz
jrichardsz / docker small small lightweight snippets.md
Created March 20, 2024 12:51
docker small small lightweight snippets

The main idea is to avoid apt update to install some common tools

zip

RUN curl http://ftp.de.debian.org/debian/pool/main/z/zip/zip_3.0-11+b1_amd64.deb -o /tmp/zip_3.0-11+b1_amd64.deb
RUN dpkg -i /tmp/zip_3.0-11+b1_amd64.deb
RUN rm /tmp/zip_3.0-11+b1_amd64.deb
select
substr(a.spid,1,9) pid,
b.status,
substr(b.serial#,1,5) ser#,
b.machine,
substr(b.username,1,10) username,
b.server,
substr(b.osuser,1,8) os_user,
substr(b.program,1,30) program
from v$session b, v$process a
@jrichardsz
jrichardsz / github sites of world class universities.md
Created March 12, 2024 15:48
github sites of world class universities
@jrichardsz
jrichardsz / go golang snippets.md
Created March 8, 2024 16:07
go golang snippets

docker run -it -v $(pwd):/src golang bash

init

go mod init sql_client

install library

go get github.com/godror/godror

SqlPing.java

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class SqlPing {