Skip to content

Instantly share code, notes, and snippets.

View fabianferno's full-sized avatar
I, engineer

Fabian Ferno fabianferno

I, engineer
View GitHub Profile
@fabianferno
fabianferno / gist:c512de7b7a0ca03c54d53ec37453b1a0
Created October 26, 2025 13:57
Line of Code: LightHouse Datacoin
Lighthouse Ipfs :
https://github.com/fabianferno/touchgrass/blob/main/frontend/hooks/useUploadToIPFS.ts#L25
Zktls Verification :
https://github.com/fabianferno/touchgrass/blob/main/frontend/components/location-verification-component.tsx#L60C1-L85C18
Datacoin Creation :
https://github.com/fabianferno/touchgrass/blob/main/frontend/hooks/useDataCoinCreation.ts#L229C5-L246C10
Datacoin minting (rewarding) :
@fabianferno
fabianferno / OSODataProcessor.ts
Created March 17, 2025 16:23
OpenSourceObserver - Karma Dataprocessor
/**
* This is a wrapper around the OSO BigQuery API.
* It is used to get data from the OSO database.
*/
import { BigQuery } from '@google-cloud/bigquery';
import { Logger } from '../../Logger';
import { config } from '../../../../config/config';
import { getWeekDates } from '../../../util/week-to-dates';
import { IndicatorDatapoint } from '../types';
@fabianferno
fabianferno / generator.js
Created July 10, 2022 10:25
NFT random colored image generator with metadata
const sharp = require("sharp");
const axios = require("axios");
const fs = require("fs");
function componentToHex(c) {
var hex = c.toString(16);
return hex.length == 1 ? "0" + hex : hex;
}
function rgbToHex(r, g, b) {