Skip to content

Instantly share code, notes, and snippets.

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
@IRMobydick
IRMobydick / OnEventListener.java
Created January 20, 2024 13:49 — forked from AliYusuf95/OnEventListener.java
Websocket implementation using OkHttp3 with {event->data} message format to make your life easier.
public interface OnEventListener {
/**
* Invoked when new message received from websocket with {event, data} structure
*
* @param data Data string received
*/
void onMessage(String data);
}
@IRMobydick
IRMobydick / svg-rounded-rectangle-path.js
Created April 16, 2024 21:22 — forked from aPinix/svg-rounded-rectangle-path.js
Create a rounded rectangle (different radius for each corner)
createSvgRectWithBorderRadius('.wrapper', '#09f', 0, 0, 400, 300, 40, 70, 20, 110);
/**
* Create a rounded rectangle (different radius for each corner)
* @author aPinix <https://twitter.com/aPinix>
* @version 1.0
* @see {@link https://codepen.io/aPinix/pen/dyRvjQq}
* @link https://codepen.io/aPinix/pen/dyRvjQq
* @param {string} elemSelector The selector for the element to append the svg
* @param {string} color The color of the rectangle