Skip to content

Instantly share code, notes, and snippets.

View jrichardsz's full-sized avatar

JRichardsz jrichardsz

View GitHub Profile
@jrichardsz
jrichardsz / wrapper.conf
Created August 21, 2020 16:08 — forked from samukasmk/wrapper.conf
Exemplo de wrapper.conf do mule
#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
@jrichardsz
jrichardsz / Dockerfile: client-side app
Last active August 25, 2020 03:37 — forked from nileshgulia1/Dockerfile: client
Docker nodejs client-side snippet
# base image
FROM node:12.2.0-alpine
# set working directory
WORKDIR /app
#copy source code
COPY . /app/
# execute standard nodejs commands
@jrichardsz
jrichardsz / test_results.html
Created August 27, 2020 18:15
A nice HTML test results report template
<html>
<head>
<title>
Test Report
</title>
<style type="text/css">
.test-result-table {
border: 1px solid black;
@jrichardsz
jrichardsz / vimeo-downloader.js
Created September 23, 2020 15:34 — forked from mistic100/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 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 / setenv.sh
Last active December 2, 2020 22:13 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@jrichardsz
jrichardsz / ClassScanner.java
Last active November 28, 2023 15:26 — forked from skempken/Detector.java
Find all annotated classes in a package using Spring
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 / http_https_nginx.conf
Last active January 2, 2021 05:26 — forked from unixcharles/nginx.conf
nginx config for http and https proxy
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
// ==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 / submit.md
Last active November 1, 2022 18:17 — forked from tanaikech/submit.md
nodejs snippert Multipart-POST Request Using Node.js multipart/form-data

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.
@jrichardsz
jrichardsz / list-files-in-folder.js
Created March 9, 2021 04:47 — forked from hubgit/list-files-in-folder.js
List all files in a folder (Google Apps Script)
function listFilesInFolder() {
var folder = DocsList.getFolder("Maudesley Debates");
var contents = folder.getFiles();
var file;
var data;
var sheet = SpreadsheetApp.getActiveSheet();
sheet.clear();