Skip to content

Instantly share code, notes, and snippets.

View nohehf's full-sized avatar
:shipit:

nohehf

:shipit:
View GitHub Profile
openapi: 3.0.3
info:
title: Swagger Petstore - OpenAPI 3.0
description: |-
This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about
Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
You can now help us improve the API whether it's by making changes to the definition itself or to the code.
That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
_If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_
@nohehf
nohehf / introspection.graphql
Created June 22, 2023 13:35
Introspection query up to date via graphql-js getIntrospectionQuery
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
@nohehf
nohehf / index.html
Created September 30, 2022 06:58
Demo api batterie n7
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Battery demo n7</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div class="battery-container">
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import {LibStorage, AppStorage, ArtefactType} from "./LibStorage.sol";
import "@solidstate/contracts/token/ERC1155/base/ERC1155BaseStorage.sol";
import "@solidstate/contracts/token/ERC1155/base/ERC1155BaseInternal.sol";
// import {ERC1155Facet} from "../facets/ERC1155Facet.sol";
import "../facets/ERC1155Facet.sol";
// Copy of the internal functions defined in: @solidstate/contracts/token/ERC1155/base/ERC1155BaseInternal.sol & associated events
@nohehf
nohehf / stripe-checkout.vue
Created December 20, 2021 23:26
Implementation of the stripe custom checkout in a vue component (see: https://stripe.com/docs/payments/quickstart)
<template>
<form id="payment-form" @submit.prevent="handleSubmit">
<div id="payment-element">
<!--Stripe.js injects the Payment Element-->
</div>
<button id="submit" v-if="!(isLoading)">
<div class="spinner hidden" id="spinner"></div>
<span id="button-text">Pay now</span>
</button>
<div id="payment-message" class="hidden"></div>
@nohehf
nohehf / pyenv-win.md
Last active June 15, 2021 12:58
How to install pyenv-win

Here is how I installed pyenv-win:

1 - Uninstall Python (your current version when you type the command python -V)

2 - Install pyenv-win and add it to the PATH (here are some optional steps to install it via chocolatey, which adds it directly to the PATH)

2.2 - Install chocolatey

2.3 - In an administrator powershell run: choco install pyenv-win