Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Osmar Leon Ingaruca jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / Dockerfile minimal live for test
Last active Nov 27, 2021
docker snippets, dockerminimal, dockerstarter, dockersandbox
View Dockerfile minimal live for test
FROM ubuntu
# Create directory
RUN mkdir /testdir
RUN echo "Hello world">> /testdir/hello2.txt
CMD /bin/bash
@jrichardsz
jrichardsz / java maven like young languages, javashell, mavenshell.md
Created Nov 27, 2021
java maven like young languages, javashell, mavenshell
View java maven like young languages, javashell, mavenshell.md
  • create starter
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
  • add logic
nano src/main/java/com/mycompany/app/App.java
  • build
@jrichardsz
jrichardsz / jekyll docker - for dev.md
Last active Nov 21, 2021
jekyll docker, jekylldocker
View jekyll docker - for dev.md

Dockerfile

FROM starefossen/ruby-node:2-6-alpine

ENV GITHUB_GEM_VERSION 202
ENV JSON_GEM_VERSION 1.8.6

RUN apk --update add --virtual build_deps \
    build-base ruby-dev libc-dev linux-headers \
View api microservice pagination.md
View google apps script notes.md

entire column range

function sumHours(range) {
  return JSON.stringify(range);
}

is an array of items in which any item is another array containg the cell value, in this case the row

View docker_mysql.md

option 1

docker run --name mysql -p 3306:3306 -v /tmp/mysql/:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=abcdefg -d mysql:5.7.17

option 2

docker run -d -p 3306:3306 --name database -e MYSQL_ROOT_PASSWORD=secret mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
@jrichardsz
jrichardsz / docker hello world nodejs.md
Last active Nov 8, 2021
docker hello world templates , dockerhelloworld
View docker hello world nodejs.md

Dockerfile

FROM node:14

WORKDIR /usr/src/app

# install dependencies
RUN npm install figlet
RUN npm install express
@jrichardsz
jrichardsz / Dockerfile for nodejs csr (react, vue, angular, etc)
Last active Nov 8, 2021
Dockerfile for nodejs webs, dockerreact, dockerangular, dockervue
View Dockerfile for nodejs csr (react, vue, angular, etc)
FROM node:10
COPY . /opt/
WORKDIR /opt/
RUN npm install
RUN npm run build
ENV PORT 8080
EXPOSE 8080
@jrichardsz
jrichardsz / mermaid code as diagram, codeasdiagram.md
Last active Nov 5, 2021
mermaid code as diagram, codeasdiagram
View mermaid code as diagram, codeasdiagram.md
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">

  <title>ACME Projects</title>
  <meta name="description" content="The HTML5 Herald">
  <meta name="author" content="SitePoint">
View mysql_cli_snippets.md
mysql -u root -psecret
SHOW DATABASES;
CREATE DATABASE app;
USE app;
source \tmp\test.sql;
CREATE TABLE `app_variables` (