Skip to content

Instantly share code, notes, and snippets.

View wycliffepeart's full-sized avatar
🏠
Working from home

Wycliffe Peart wycliffepeart

🏠
Working from home
View GitHub Profile
@wycliffepeart
wycliffepeart / beautiful.rest.api.docs.in.markdown.md
Created February 7, 2024 23:01 — forked from azagniotov/beautiful.rest.api.docs.in.markdown.md
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@wycliffepeart
wycliffepeart / toolbar.xml
Created December 4, 2017 12:59
Toolbar Elevation on Pre-lollipop Devices.
<!-- Create a new XML file toolbar.xml in directory res/layouts -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
@wycliffepeart
wycliffepeart / Javascript-FileUploader.js
Last active June 27, 2016 20:18
Javascript Sending form data using iframe
"use strict";
document.getElementById("file-upload-form").addEventListener("submit", (e) => {
e.preventDefault();
this.inputElement = [];
this.iframeName = "uploader-facade";
this.form = document.createElement("form");
this.iframe = document.createElement("iframe");
@wycliffepeart
wycliffepeart / merge-object.js
Last active December 8, 2020 03:32
Javascript Object.assign Alternative . The mergeObject() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.
function mergeObject(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (source.hasOwnProperty(key)) {
target[key] = source[key];
}
}
}
return target;
@ygotthilf
ygotthilf / jwtRS256.sh
Last active November 7, 2024 10:42
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub