Skip to content

Instantly share code, notes, and snippets.

Avatar

Richard Osmar Leon Ingaruca jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / list-files-in-folder.js
Created Mar 9, 2021 — forked from hubgit/list-files-in-folder.js
List all files in a folder (Google Apps Script)
View list-files-in-folder.js
function listFilesInFolder() {
var folder = DocsList.getFolder("Maudesley Debates");
var contents = folder.getFiles();
var file;
var data;
var sheet = SpreadsheetApp.getActiveSheet();
sheet.clear();
@jrichardsz
jrichardsz / submit.md
Last active Feb 6, 2021 — forked from tanaikech/submit.md
nodejs snippert Multipart-POST Request Using Node.js multipart/form-data
View submit.md

Multipart-POST Request Using Node.js

Here, I introduce 2 scripts for uploading files to Slack using Node.js as samples. These 2 sample scripts are for uploading files to Slack.

Sample script 1:

  • You can upload the zip file by converting byte array as follows.
    • At first, it builds form-data.
    • Adds the zip file converted to byte array and boundary using Buffer.concat().
    • This is used as body in request.
View ReplaceURLs(GoogleImages).user.js
// ==UserScript==
// @name ReplaceURLs(GoogleImages)
// @namespace http://ashiato1.blog62.fc2.com/
// @description Replace URLs with orig image
// @author tomato111
// @version 0.0.8
// @downloadURL https://gist.github.com/tomato111/681d634ded1a9bd3107e2baf60460a35/raw/ReplaceURLs(GoogleImages).user.js
// @updateURL https://gist.github.com/tomato111/681d634ded1a9bd3107e2baf60460a35/raw/ReplaceURLs(GoogleImages).user.js
// @include https://www.google.*/search?*tbm=isch*
// @include https://www.google.*/search?*tbs=sbi*
@jrichardsz
jrichardsz / http_https_nginx.conf
Last active Jan 2, 2021 — forked from unixcharles/nginx.conf
nginx config for http and https proxy
View http_https_nginx.conf
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
@jrichardsz
jrichardsz / ClassScanner.java
Last active Dec 17, 2020 — forked from skempken/Detector.java
Find all annotated classes in a package using Spring
View ClassScanner.java
import java.lang.annotation.Annotation;
import java.util.LinkedList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.web.context.support.StandardServletEnvironment;
@jrichardsz
jrichardsz / setenv.sh
Last active Dec 2, 2020 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
View setenv.sh
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@jrichardsz
jrichardsz / vimeo-downloader.js
Created Sep 23, 2020 — forked from mistic100/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>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
@jrichardsz
jrichardsz / test_results.html
Created Aug 27, 2020 — forked from cemremengu/test_results.html
A nice HTML test results report template
View test_results.html
<html>
<head>
<title>
Test Report
</title>
<style type="text/css">
.test-result-table {
border: 1px solid black;
@jrichardsz
jrichardsz / Dockerfile: client-side app
Last active Aug 25, 2020 — forked from nileshgulia1/Dockerfile: client
Docker nodejs client-side snippet
View Dockerfile: client-side app
# base image
FROM node:12.2.0-alpine
# set working directory
WORKDIR /app
#copy source code
COPY . /app/
# execute standard nodejs commands
@jrichardsz
jrichardsz / wrapper.conf
Created Aug 21, 2020 — forked from samukasmk/wrapper.conf
Exemplo de wrapper.conf do mule
View wrapper.conf
#encoding=UTF-8
#********************************************************************
# System Properties
#********************************************************************
# Location of your Mule installation.
wrapper.java.additional.1=-Dmule.home="%MULE_HOME%"
wrapper.java.additional.1.stripquotes=TRUE
wrapper.java.additional.2=-Dmule.base="%MULE_HOME%"
wrapper.java.additional.2.stripquotes=TRUE