Skip to content

Instantly share code, notes, and snippets.

View aiomonitors's full-sized avatar
🎯

Shihab Chowdhury aiomonitors

🎯
View GitHub Profile
const allLinks = $('source[type="audio/mpeg"]')
.toArray().map((elem) => {
return $(elem).attr('src')
});
function downloadBlob(blob, filename) {
const a = document.createElement('a');
a.download = decodeURI(filename);
a.href = blob;
a.className = Math.floor(Math.random() * 100000).toString();
@aiomonitors
aiomonitors / HasWhitelist.sol
Last active November 19, 2021 03:14
An abstract solidity contract for easily adding whitelist functionality to your smart contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
// @title An abstract contract for contracts that have a whitelist
// @author twitter.com/aiomonitors
// @dev Should be inherited
abstract contract HasWhitelist is Ownable {
@aiomonitors
aiomonitors / supremefw20.js
Created August 21, 2019 14:16
Scrapes Lookbook and converts to JSON data
const Promise = require('promise');
const Embed = require('./maker.js').Embed;
const Logger = require('./logger.js').logger;
const funcs = require('./funcs.js');
const request = require('request-promise-native');
const cheerio = require('cheerio');
let jar = request.jar();
let infoJson = {};
@aiomonitors
aiomonitors / SupremeLookbook.json
Created August 20, 2019 18:39
The entire lookbook from this Supreme season in JSON format. Includes the name, description, image URL, and the url to the lookbook item.
{
"Martin Wong/Supreme Schott® 8-Ball Leather Varsity Jacket": {
"description": "Cowhide leather with satin lining and full zip closure. Double welt hand pockets at lower front and interior chest pocket. Embroidered logo on chest and printed graphic on back. Original artwork by Martin Wong. Made exclusively for Supreme.",
"image": "https://assets.supremenewyork.com/174592/zo/jw9zknKCOVw1.jpg",
"url": "/previews/fallwinter2019/jackets/martin-wong-supreme-schott-8-ball-leather-varsity-jacket-4"
},
"Team Varsity Jacket": {
"description": "Wool blend with cowhide leather sleeves and quilted satin lining. Snap front closure with double welt hand pockets at lower front and interior chest pocket. Two-layer felt and chenille appliqué graphics with embroidery. Washed for a worn-in appearance.",
"image": "https://assets.supremenewyork.com/173588/zo/8aqbRDRNYJo.jpg",
"url": "/previews/fallwinter2019/jackets/team-varsity-jacket-6"
@aiomonitors
aiomonitors / SupremeLookbook.json
Created August 20, 2019 18:39
The entire lookbook from this Supreme season in JSON format. Includes the name, description, image URL, and the url to the lookbook item.
{
"Martin Wong/Supreme Schott® 8-Ball Leather Varsity Jacket": {
"description": "Cowhide leather with satin lining and full zip closure. Double welt hand pockets at lower front and interior chest pocket. Embroidered logo on chest and printed graphic on back. Original artwork by Martin Wong. Made exclusively for Supreme.",
"image": "https://assets.supremenewyork.com/174592/zo/jw9zknKCOVw1.jpg",
"url": "/previews/fallwinter2019/jackets/martin-wong-supreme-schott-8-ball-leather-varsity-jacket-4"
},
"Team Varsity Jacket": {
"description": "Wool blend with cowhide leather sleeves and quilted satin lining. Snap front closure with double welt hand pockets at lower front and interior chest pocket. Two-layer felt and chenille appliqué graphics with embroidery. Washed for a worn-in appearance.",
"image": "https://assets.supremenewyork.com/173588/zo/8aqbRDRNYJo.jpg",
"url": "/previews/fallwinter2019/jackets/team-varsity-jacket-6"