Skip to content

Instantly share code, notes, and snippets.


JRichardsz jrichardsz

View GitHub Profile
jrichardsz /
Created Aug 10, 2022 — forked from azagniotov/
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
View mocha run programatically.js
var Mocha = require('mocha');
var path = require('path');
var fs = require('fs').promises;
const glob = require("glob");
var mocha = new Mocha({});
(async() => {
var listFiles = function () {
View mail snippet - nodejs microsoft.js
var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
host: '', // Office 365 server
port: 587, // secure SMTP
secure: false, // false for TLS - as a boolean not string - but the default is false so just remove this completely
auth: {
user: process.env.username,
pass: process.env.password
View git

workspace_path=$(pwd) echo "workspace_path:$workspace_path"

cd $workspace_path git add --all

echo "CUSTOM_GIT_AUTHOR=$CUSTOM_GIT_AUTHOR" if [[ -n "$CUSTOM_GIT_AUTHOR" ]] then git commit --author="$CUSTOM_GIT_AUTHOR" -m "$1"

jrichardsz /
Last active Aug 7, 2022
configure elementary apps
cd /tmp
# Install Atom
curl -sL | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] any main" > /etc/apt/sources.list.d/atom.list'
sudo apt-get update
sudo apt-get install atom
jrichardsz / linux prompt
Last active Aug 6, 2022
linux prompt customization
View linux prompt

hide path

export PS1="\u >"

export PS1="\u :"
jrichardsz /
Last active Aug 5, 2022 — forked from skempken/
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;
jrichardsz / docker
Last active Aug 5, 2022
mysql cli snippets, mysql import , mysql export, mysql truncate
View docker

copy script

docker cp /tmp/workspace/ my_mysql_container:/usr/local/bin/

copy dump

docker cp /tmp/workspace/dump.sql my_mysql_container:/tmp
View PayPal API Design Patterns
# API Design Patterns And Use Cases
This document lists various useful patterns for API design. We encourage API developers to consider the following patterns as a guide while designing APIs for services.
### Document Semantics, Formatting, and Naming
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](
View PayPal API Standards
# API Design Guidelines
# Introduction
The PayPal platform is a collection of reusable services that encapsulate well-defined business capabilities. Developers are encouraged to access these capabilities through Application Programming Interfaces (APIs) that enable consistent design patterns and principles. This facilitates a great developer experience and the ability to quickly compose complex business processes by combining multiple, complementary capabilities as building blocks.
PayPal APIs follow the [RESTful][0] architectural style as much as possible. To support our objectives, we have developed a set of rules, standards, and conventions that apply to the design of RESTful APIs. These have been used to help design and maintain hundreds of APIs and have evolved over several years to meet the needs of a wide variety of use cases.
We are sharing these guidelines to help propagate good API design practices in general. We have pulled extensively from the broader community and believe that it is importan