Skip to content

Instantly share code, notes, and snippets.

View stwiname's full-sized avatar

Scott Twiname stwiname

View GitHub Profile
@stwiname
stwiname / braintree.d.ts
Last active May 10, 2019 20:08
Typescript definition file for Braintree node module
//TODO update objects to show optional parameters
//TODO expand on Function parameters
//TODO add enum types
//TODO add error types
declare module Braintree {
/**********************
* Errors *

HTTP Queue

The aim is to write a simple http server with methods to use a queue.

Methods

These methods should be implemented:

  • POST /queue/pop - Should pop from the queue and return the pushed JSON object with an ID and created time added
  • POST /queue/push - Should submit a JSON object to the server and push it to the queue. The response should be a JSON object with the id
  • GET /queue/count Should return the size of the queue in a JSON object

HTTP Queue

The aim is to write a simple http server with methods to use a queue.

Methods

These methods should be implemented:

  • POST /queue/pop - Should pop from the queue and return a JSON object with an ID and created time
  • POST /queue/push - Should submit JSON object to a server with an ID and push it to the queue
  • GET /queue/count Should return the size of the queue in a JSON object
package main
/*
#cgo LDFLAGS: -lpthread -Llibrary -ltesting
#include "library/testing.h"
extern void cgo_callback_wrapper(void * context, char *message, int message_len);
*/
import "C"
0415fc9fdae8468d3282c6e75880667511befb89b9cc8119c1228f2f82f45eb523a88ce685db347f2185fb610aa78f0c6f133af3aca798a9acd9e7db9da7bb4bcd;cednz

The Sylo Developer Guide

Branching

Naming

Branch names should take the format [type]/[name].

The type is what the purpose of the branch is, is it a fix or a feature or something else?

Breif

To remember the user we will store a boolean as a string in AsyncStorage

It then needs to be loaded and set in redux state as well

Current practices

This is the most up to date way we do things

@stwiname
stwiname / GameLib.sol
Created June 1, 2020 20:41
GameLib.sol
// File: @openzeppelin/contracts/math/SafeMath.sol
pragma solidity ^0.6.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
@stwiname
stwiname / project.yaml
Last active February 22, 2022 20:27
Example EVM with multiple ABIs
specVersion: 0.2.0
name: zoombies-subquery
version: 1.0.0
description: Zoom Token mint, burn and approvals, Zoombies NFT events on Moonriver
repository: https://github.com/ryanprice/zoombies-subquery
schema:
file: ./schema.graphql
network:
genesisHash: '0x401a1f9dca3da46f5c4091016c8a2f26dcea05865116b286f60f668207d1474b' # Genesis hash of Moonriver
endpoint: wss://moonriver.api.onfinality.io/public-ws
@stwiname
stwiname / subquery-manifest-schema.json
Created August 11, 2023 03:42
Rough Subquery Manifest JSON Schema
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/SubQuery",
"definitions": {
"SubQuery": {
"type": "object",
"additionalProperties": false,
"properties": {
"specVersion": {
"type": "string",