Skip to content

Instantly share code, notes, and snippets.

View VotingPower.sol.patch
1,289c1
< // SPDX-License-Identifier: MIT
<
< pragma solidity ^0.8.3;
<
< import "../interfaces/IHasVotes.sol";
< import "../interfaces/IVotingDelegates.sol";
<
< /**
< * Power to vote. Heavily based on Uni.
@macalinao
macalinao / multisig.json
Last active Apr 11, 2021
Celo Multisig ABI
View multisig.json
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
View ubeswap.patch
diff --git a/contracts/uniswapv2/README.md b/contracts/uniswapv2/README.md
index ffa15f4..88cbeba 100644
--- a/contracts/uniswapv2/README.md
+++ b/contracts/uniswapv2/README.md
@@ -1,13 +1,14 @@
# Uniswap V2 Area
-Code from [Uniswap V2](https://github.com/Uniswap/uniswap-v2-core/tree/27f6354bae6685612c182c3bc7577e61bc8717e3/contracts) with the following modifications.
+Code from [Sushiswap](https://github.com/sushiswap/sushiswap/tree/017ac93b1f6e970516652629a4d1bc47a8c584d7/contracts) with the following modifications.
View gist:a8712b527c6bc1a6ff525665b9e9f5c8
const fetch = require("node-fetch");
const main = async () => {
const result = await fetch(
"https://api-consumer-client.doordash.com/graphql",
{
credentials: "omit",
headers: {
accept: "*/*",
"accept-language": "en-US",
View gist:91ba8e2451f3560c14a7c05374740dfd
{ pkgs, lib, config, ... }:
lib.mkMerge [
(
pkgs.callPackage (import ./common.nix) { }
)
(
lib.mkIf
(builtins.pathExists "${config.home.homeDirectory}/private_secrets")
(
View useLoadMore.ts
import * as R from "ramda";
import { useState } from "react";
/**
* Default to displaying only pageSize items, but allow loadMore.
* @param items Items to return
* @param getId The serialized ID of the item.
* @param pageSize Number of items to display per page.
* @returns [filteredItems, loadMore, hasMore]
*/
View selfcontained.scala
[info] Compiling 1 Scala source to /Users/ian/proj/macalinao/scala-playground/target/scala-2.12/classes...
[error] /Users/ian/proj/macalinao/scala-playground/src/main/scala/pw/ian/playground/shapeless/BrokenSplitter.scala:87: ambiguous implicit values:
[error] both value scgen in object StatsAndPopGenerator of type => shapeless.Generic[pw.ian.playgroiund.shapeless.StatsAndPopGenerator.ScM]{type Repr = scala.collection.immutable.Map[Int,pw.ian.playgroiund.shapeless.StatsAndPopGenerator.Moments] :: shapeless.HNil}
[error] and value cgen in object StatsAndPopGenerator of type => shapeless.Generic[pw.ian.playgroiund.shapeless.StatsAndPopGenerator.ScS]{type Repr = Option[pw.ian.playgroiund.shapeless.StatsAndPopGenerator.Stat] :: shapeless.HNil}
[error] match expected type shapeless.Generic.Aux[MG,M]
[error] ] = genericGenerator
[error] ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 0 s, completed Nov 25, 2017 4:29:41 PM
View statsandpopgenerator.scala
[info] Compiling 1 Scala source to /Users/ian/proj/asunaio/alexandria/target/scala-2.12/classes...
[error] /Users/ian/proj/asunaio/alexandria/src/main/scala/asuna/alexandria/transforms/StatsAndPopGenerator.scala:73: ambiguous implicit values:
[error] both value scgen in object StatsAndPopGenerator of type => shapeless.Generic[asuna.proto.league.monoids.all_champions_sums.Scalars]{type Repr = scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna.proto.league.monoids.match_sum.Moments] :: scala.collection.immutable.Map[Int,asuna
@macalinao
macalinao / lol-champions.json
Created Sep 18, 2017
League of Legends Champions in JSON format
View lol-champions.json
{
"data": {
"static_entry": {
"champions": [
{
"value": {
"id": 69,
"name": "Cassiopeia",
"blurb": "Cassiopeia is a terrifying creature - half woman, half snake - whose slightest glance brings death. The youngest daughter of one of Noxus' most influential families, she was once a beautiful and cunning temptress capable of manipulating the hardest...",
"tags": [
View gist:c65fe0a726865ae986b2bdebe722454f
{
"data": {
"static_entry": {
"champions": [
{
"value": {
"id": 69,
"name": "Cassiopeia",
"image": {
"full": "Cassiopeia.png"