Skip to content

Instantly share code, notes, and snippets.

View passionofvc's full-sized avatar

passionofvc passionofvc

  • Tokyo Japan
View GitHub Profile
@passionofvc
passionofvc / jade-ftw.md
Created March 29, 2022 02:13 — forked from japboy/jade-ftw.md
Jade について。

Jade FTW

こんにちは。今回は現実逃避を兼ねて Jade の素晴らしさをお伝えしたいと思います。

Jade とは何か

[Jade][0] は JST (JavaScript Templates) の一つであり、HTML を書くための[軽量マークアップ言語][1] である [Haml][2] に影響を受けた JavaScript テンプレートエンジンでもあります。

@passionofvc
passionofvc / jq-cheetsheet.md
Created October 15, 2021 02:26 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@passionofvc
passionofvc / ethminer.sh
Last active March 6, 2021 09:02
start_eth_miner.sh
```
#https://github.com/ethereum-mining/ethminer
#start_eth_miner.sh
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
@passionofvc
passionofvc / WireGuard-site-to-site.md
Created January 28, 2021 01:12
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@passionofvc
passionofvc / README.md
Created January 17, 2021 06:31 — forked from crypticmind/README.md
Setup lambda + API Gateway using localstack
@passionofvc
passionofvc / README.md
Created November 5, 2020 03:57 — forked from lcrilly/README.md
NGINX OAuth 2.0 Token Introspection

OAuth 2.0 Token Introspection with NGINX and njs

This configuration enables NGINX to validate an authentication token against an authorization server by using OAuth 2.0 Token Introspection (RFC 7662). This solution uses the auth_request module and the NGINX JavaScript module to require authentication and perform the token introspection request.

By default, the client's authentication token is expected as a bearer token supplied in the Authorization header. If supplied elsewhere in the HTTP request, the $access_token variable must be configured to specify where to obtain the token.

Token introspection requests are authenticated. By default, the $oauth_client_id and $oauth_client_secret variables are used to perform HTTP Basic authentication with the Authorization Server. If only the $oauth_client_secret variable is specified then that value is used

@passionofvc
passionofvc / app.js
Created October 28, 2020 03:06 — forked from papandreou/app.js
graphqlInMultipartFormDataMiddleware.js
const { graphqlExpress } = require('graphql-server-express');
const graphQlTools = require('graphql-tools');
const schema = graphQlTools.makeExecutableSchema({
typeDefs: schemaText,
resolvers: {
Mutation: {
async uploadFiles(obj, { input }, req, info }) {
// ...
try {
@passionofvc
passionofvc / reason.js
Last active October 24, 2020 13:51 — forked from gluk64/reason.js
const ethers = require('ethers')
const Web3 = require('web3');
const quorumjs = require("quorum-js");
const WEB3_URL = 'http://localhost:22000';
const web3 = new Web3(
new Web3.providers.HttpProvider(`${WEB3_URL}`)
);
quorumjs.extend(web3);
@passionofvc
passionofvc / Diamond_flat.sol
Created October 6, 2020 02:04
Diamond_flat.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;
pragma experimental ABIEncoderV2;
/******************************************************************************\
* Author: Nick Mudge
*
* Implementation of an example of a diamond.
/******************************************************************************/
@passionofvc
passionofvc / README.md
Created September 12, 2020 08:44 — forked from joyrexus/README.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output