Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Osmar Leon Ingaruca jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / docker aws snippets.md
Last active Oct 22, 2021
docker aws snippets , dockeraws dockerawssnippet
View docker aws snippets.md

Dockerfile v1

FROM amazon/aws-cli
COPY DockerfileEntryPoint.sh /usr/local/bin/DockerfileEntryPoint.sh
RUN chmod 744 /usr/local/bin/DockerfileEntryPoint.sh
ENTRYPOINT ["DockerfileEntryPoint.sh"]

DockerfileEntryPoint.sh

@jrichardsz
jrichardsz / docker run.log
Last active Oct 20, 2021
openxava with maven and docker
View docker run.log
Sending build context to Docker daemon 11.41MB
Step 1/36 : FROM openjdk:8-jdk AS BUILDER
---> eca41db787bd
Step 2/36 : ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8 LC_ALL=C.UTF-8 ANT_VERSION=1.10.11 ANT_MIRROR=https://downloads.apache.org ANT_HOME=/opt/ant
---> Using cache
---> a4ca03d88e6c
Step 3/36 : RUN apt-get update && apt-get install -y --no-install-recommends wget && wget --no-check-certificate --no-cookies ${ANT_MIRROR}/ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && tar -zvxf apache-ant-${ANT_VERSION}-bin.tar.gz -C /opt/ && ln -sf /opt/apache-ant-${ANT_VERSION} /opt/ant && rm -f apache-ant-${ANT_VERSION}-bin.tar.gz* && update-alternatives --install /usr/bin/ant ant /opt/ant/bin/ant 1000 && rm -rf /var/lib/apt/lists/*
---> Using cache
---> 63f5ca91441b
Step 4/36 : ARG MAVEN_VERSION=3.5.2
@jrichardsz
jrichardsz / vimeo-downloader.js
Created Oct 3, 2021 — forked from alexdrean/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
View vimeo-downloader.js
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// (done automatically now) 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
const { exec } = require('child_process');
@jrichardsz
jrichardsz / download google drive public file.md
Created Oct 1, 2021 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl, downloaddrive
View download google drive public file.md

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}"
@jrichardsz
jrichardsz / GoogleClient.java
Created Sep 26, 2021
google oauth2 java client, googleoaauth2
View GoogleClient.java
package org.jrichardsz.horus.third.google.client;
import java.util.Map;
import org.jrichardsz.horus.exceptions.BadGoogleResponseException;
import org.jrichardsz.horus.exceptions.GoogleOauthRestApiException;
public interface GoogleClient {
public String getAuthorizeUrl(String redirectUri, String scope, String clientId);
@jrichardsz
jrichardsz / DatabaseResultToParser.java
Created Sep 26, 2021
sql to json , sqltojson DatabaseResultToParser.java
View DatabaseResultToParser.java
package org.jrichardsz.horus.common;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
public class DatabaseResultToParser {
View youtube screen.md
  • just create a book mark with this url
  • play the video and stop it
  • click in the bookmark
javascript:"use strict";!function(window,document){var canvas=document.createElement("canvas"),video=document.querySelector("video"),ctx=canvas.getContext("2d");canvas.width=parseInt(video.offsetWidth),canvas.height=parseInt(video.offsetHeight),ctx.drawImage(video,0,0,canvas.width,canvas.height);var base64ImageData=canvas.toDataURL("image/jpeg"),filename="snap-"+canvas.width+"x"+canvas.height+"-"+video.currentTime+".jpg",a=document.createElement("a");a.download=filename,a.href=base64ImageData;var img=document.createElement("img");img.src=base64ImageData,img.alt=filename,img.title="Click to save "+filename,window.open().document.body.appendChild(a).appendChild(img)}(window,document);

https://github.com/ReeganExE/youtube-screenshot

@jrichardsz
jrichardsz / yaml java groovy research.md
Created Sep 17, 2021
yaml java groovy research.md
View yaml java groovy research.md

sample

volumes:
- name: wordpress-persistent-storage
  persistentVolumeClaim:
    claimName: wp-pv-claim

research findings