Skip to content

Instantly share code, notes, and snippets.

View liximomo's full-sized avatar
👻
Hi, there.

X.L liximomo

👻
Hi, there.
View GitHub Profile
# 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
@liximomo
liximomo / MouseTrail.jsx
Created April 25, 2019 03:02
Mouse Trail
import React from 'react';
/* Mouse trail adapted from a jQuery Codepen by Bryan C https://codepen.io/bryjch/pen/QEoXwA */
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
this.lifetime = 0;
}
@liximomo
liximomo / utli.css
Created September 17, 2018 08:52
Hide element but remain available to assistive technology.
.AccessibleOnly {
clip: rect(1px 1px 1px 1px); /* IE 6/7 */
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap; /* added line */
width: 1px;
}
@liximomo
liximomo / xss.js
Created January 31, 2018 08:22
xss-hacker101-level0
alert(1);
@liximomo
liximomo / cloudSettings
Last active November 15, 2019 02:57
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-11-15T02:57:28.608Z","extensionVersion":"v3.4.2"}
@liximomo
liximomo / cloudSettings
Created May 22, 2017 08:10
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-05-22T08:10:20.241Z","extensionVersion":"v2.7.0"}
@liximomo
liximomo / cloudSettings
Last active May 22, 2017 08:09
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-05-22T08:09:47.313Z","extensionVersion":"v2.7.0"}
function toDataURL(url) {
return fetch(url, {
credentials: 'include',
})
.then(response => response.blob())
.then(blob => new Promise((resolve, reject) => {
var reader = new FileReader();
reader.onloadend = () => resolve(reader.result);
reader.onerror = reject;
reader.readAsDataURL(blob);
@liximomo
liximomo / event.js
Created November 18, 2016 15:51
dom utils
function addDOMEvent(html_element, event_name, event_function, useCapture)
{
if(html_element.addEventListener) {
html_element.addEventListener(event_name, event_function, useCapture); //don't need the 'call' trick because in FF everything already works in the right way
return;
}
//Internet Explorer
html_element.attachEvent("on" + event_name, function() { event_function.call(html_element); });
}
@liximomo
liximomo / you.md
Created November 5, 2016 11:47
文字

鱼的记忆只有七秒,(七秒),关于你的记忆只有雨中的九秒,被淋湿,视线模糊了,是雨水