Skip to content

Instantly share code, notes, and snippets.

View fraguada's full-sized avatar

Luis E. Fraguada fraguada

View GitHub Profile
@schwittlick
schwittlick / hic_et_nunc_basic_scraper.py
Last active April 17, 2021 07:21 — forked from Quasimondo/hic_et_nunc_basic_scraper.py
This is a very basic no-frills scraper to retrieve the metadata and digital assets from all tokens minted on hicetnunc.xyz. I share this as a starting point for people who want to experiment with building alternative views on the works created on the platform or preserve the data. Feel free to improve upon this or add additional features.
import requests
import os
import ipfsapi
import concurrent.futures
api = ipfsapi.Client(host='https://ipfs.infura.io', port=5001)
url = "https://better-call.dev/v1/contract/mainnet/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/tokens"
r = requests.get(url)
@Quasimondo
Quasimondo / hic_et_nunc_basic_scraper.py
Created March 10, 2021 11:23
This is a very basic no-frills scraper to retrieve the metadata and digital assets from all tokens minted on hicetnunc.xyz. I share this as a starting point for people who want to experiment with building alternative views on the works created on the platform or preserve the data. Feel free to improve upon this or add additional features.
import requests
import os
import ipfsApi
api = ipfsApi.Client(host='https://ipfs.infura.io', port=5001)
url = "https://better-call.dev/v1/contract/mainnet/KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton/tokens"
r = requests.get(url)
data = r.json()
@donmccurdy
donmccurdy / JAVASCRIPT_LIBRARY_TOOLS.md
Last active April 16, 2021 05:36
A minimal set of tools for creating a JavaScript or TypeScript library.

These are the build tools I prefer to use when starting a new JavaScript or TypeScript library. Most libraries I write run both in the browser and in node.js. Each project needs to be lightweight, and to minimize maintenance. And I need build chains for those libraries to pretty much "just work". That last part has become more important over time, as I've maintained more libraries and generally had less time to deal with dependencies and build system issues. For web applications, as opposed to libraries consumed in other projects, these choices may or may not make sense. These are opinionated choices, and will probably change over time.

Almost always:

  • microbundle: Zero-config Rollup bundler, with optional TypeScript support
  • tape: Test runner
  • tap-spec: Clean test output

Occasionally:

@donmccurdy
donmccurdy / DRACOLoader.patch
Last active September 25, 2023 13:49
THREE.GLTFLoader with Draco support in Node.js.
diff --git a/node_modules/three/examples/js/loaders/DRACOLoader.js b/NodeDRACOLoader.js
index 57767d7..cc46f2c 100644
--- a/node_modules/three/examples/js/loaders/DRACOLoader.js
+++ b/NodeDRACOLoader.js
@@ -14,10 +14,12 @@
//
'use strict';
+const decoder = require('draco3dgltf').createDecoderModule();
+
@Phlow
Phlow / for-loop-sorted-collection
Last active December 8, 2023 07:28
This Liquid loop for Jekyll sorts a collection by date in reverse order
{% comment %}
*
* This loop loops through a collection called `collection_name`
* and sorts it by the front matter variable `date` and than filters
* the collection with `reverse` in reverse order
*
* To make it work you first have to assign the data to a new string
* called `sorted`.
*
{% endcomment %}
@lontivero
lontivero / gist:593fc51f1208555112e0
Last active June 24, 2023 20:05
Generates Markdown from VS XML documentation file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace GithubWikiDoc
{
@futureshape
futureshape / gist:1328159
Created October 31, 2011 17:54
Ethercard getNtpTime
unsigned long getNtpTime() {
unsigned long timeFromNTP;
const unsigned long seventy_years = 2208988800UL;
ether.ntpRequest(ntpServer, ntpMyPort);
Serial.println("NTP request sent");
while(true) {
word length = ether.packetReceive();
ether.packetLoop(length);
if(length > 0 && ether.ntpProcessAnswer(&timeFromNTP,ntpMyPort)) {