Skip to content

Instantly share code, notes, and snippets.

View gosseti's full-sized avatar

Lawrence Gosset gosseti

View GitHub Profile
@gosseti
gosseti / errors.ts
Created May 20, 2024 16:24
Contract error codes
/**
* This code was generated by generateTsPackage.
* Do not edit it manually
*/
export declare const ContractErrorsByName: {
readonly AccessControl_Sender_Must_Be_Admin: {
readonly contractName: "FoundationTreasury";
readonly name: "AccessControl_Sender_Must_Be_Admin";
readonly errorCode: "0xc41405ee";
};
@gosseti
gosseti / docker-compose.yml
Created May 7, 2024 22:51
docker-compose.yml
# A working Docker Compose configuration file that starts a working hub.
#
# See https://www.thehubble.xyz/intro/install.html#installing-hubble for full
# instructions.
#
# WARNING: Running `docker compose up` from the latest commit on the main
# branch may not work. Make sure to check out the latest tagged release first:
#
# git fetch --tags --force && git checkout @latest && docker compose up
@gosseti
gosseti / artwork.json
Created July 30, 2022 16:26
artwork payload
{
"id": "6c78b554-4b08-4f7d-9b5f-15ac618e6d62",
"name": "Ylop",
"description": "",
"assetScheme": "https://",
"assetHost": "f8n-production-collection-assets.imgix.net",
"assetPath": "/0x46Be8f341dbdF7Bb0890Ddb5056f62c3c034CbF6/9/nft.gif",
"assetIPFSPath": "QmQpxifUVa1LhrBgNMTWrKS1jCXbJLBbQ7Z53msjcXvSuL/nft.gif",
"metadataScheme": "https://",
"metadataHost": "ipfs.io",
@gosseti
gosseti / enum-in-array.tsx
Last active July 13, 2022 16:20
TypeScript Question
// when T is a custom type we want to infer from
// that rather than extending from any string
export function isValueInArray<T extends string>(
values: T[],
value: T | undefined
) {
return value ? values.includes(value) : false;
}
type Status = 'PENDING' | 'ERROR' | 'SUCCESS';
@gosseti
gosseti / index.html
Created March 14, 2018 18:11
CampaignMonitor form
<form id="subForm" class="js-cm-form" action="https://www.createsend.com/t/subscribeerror?description=" method="post" data-id="A61C50BEC994754B1D79C5819EC1255CF918EA4461ABD274FF5FC92A3B4F4151F402A76763551CB7D3D4AC1E2361AFD2E85A761A108693FCE3D82C70BE5AEBD0">
<p>
<label for="fieldName">Name</label><br />
<input id="fieldName" name="cm-name" type="text" />
</p>
<p>
<label for="fieldEmail">Email</label><br />
<input id="fieldEmail" class="js-cm-email-input" name="cm-vtikrl-vtikrl" type="email" required />
</p>
@gosseti
gosseti / main.es5.js
Last active February 1, 2022 01:02
makeSpans.js
'use strict'
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr) }
function makeSpans (selector) {
var _document$querySelect = document.querySelectorAll(selector)
var _document$querySelect2 = _toArray(_document$querySelect)
var elements = _document$querySelect2.slice(0)
return elements.map(function (element) {
@gosseti
gosseti / shots.json
Created June 28, 2017 13:19
dribbble API JSON response
[{
"id": 2971559,
"title": "Profiling",
"description": null,
"width": 400,
"height": 300,
"images": {
"hidpi": "https://cdn.dribbble.com/users/1/screenshots/2971559/new-profiles.jpg",
"normal": "https://cdn.dribbble.com/users/1/screenshots/2971559/new-profiles_1x.jpg",
"teaser": "https://cdn.dribbble.com/users/1/screenshots/2971559/new-profiles_teaser.jpg"
@gosseti
gosseti / gist:788a5fd8f607b7505e71
Created December 5, 2014 14:22
dokku-pg-plugin
Step 0 : FROM ubuntu:trusty
---> 86ce37374f40
Step 1 : MAINTAINER kload "kload@kload.fr"
---> Using cache
---> bf41e25f0a8d
Step 2 : RUN echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d; chmod +x /usr/sbin/policy-rc.d
---> Using cache
---> 2f2fc4b4f6ca
Step 3 : RUN apt-get update
---> Using cache
@gosseti
gosseti / form.html
Last active February 21, 2017 18:28
A credit card form using jQuery.payment
<form accept-charset="UTF-8" action="/payment" class="cardInfo" method="post">
<fieldset class="cardInfo__cardDetails">
<div class="form-row cardInfo__cc-num">
<label for="cc-num"><abbr title="required">*</abbr><span>Card Number</span></label>
<div class="cc-num__wrap">
<!-- using type="tel" because type="number" doesn’t pass HTML5 form validation with jQuery.payment formatting -->
<input id="cc-num" type="tel" class="paymentInput cc-num" placeholder="•••• •••• •••• ••••" autocompletetype="cc-number" required="required">
<span class="card" aria-hidden="true"></span>
@gosseti
gosseti / modernizr-typekit
Created December 6, 2012 16:36
A Typekit snippet that uses Modernizr.load (yepnope) to asynchronously load webfonts only for in browsers that support @font-face.
Modernizr.load([{
test: Modernizr.fontface,
complete: function() {
TypekitConfig = {
kitId: 'xxxxxxx',
scriptTimeout: 3000
};
(function() {
var t = setTimeout(function() {
}, TypekitConfig.scriptTimeout);