Skip to content

Instantly share code, notes, and snippets.

View varadan13's full-sized avatar
🎯
Focusing

Aneesh Varadan varadan13

🎯
Focusing
View GitHub Profile
@varadan13
varadan13 / gates.rktd
Last active May 10, 2024 07:26
Logic Gates
(define nand
(lambda (a b) (match (list a b)
[(list 1 1) 0]
[(list _ _) 1])))
(define not
(lambda (a) (nand a a)))
const extract = $$('div.hit').reduce((prev, ele) =>
[...prev, {
title : ele.querySelector("a.hitlnk_name").innerText,
subtitle : ele.querySelector("div.category")?.innerText,
address : ele.querySelector("address")?.innerText}],
[])
import { SitemapBuilder } from "next-sitemap";
import fs from "fs";
import crypto from "crypto";
const toChunks = (arr, chunkSize) => {
return arr.reduce(
(prev, _, i) =>
i % chunkSize ? prev : [...prev, arr.slice(i, i + chunkSize)],
[]
);
const axios = require('axios');
const cheerio = require('cheerio');
const urls = [
"https://www.forum.hr/showthread.php?t=777980&page=11",
"https://www.forum.hr/showthread.php?t=232045"
];
function intoBinary(num) {
if (num === 0 || num === 1) {
return num;
}
function inner(str, idx) {
// mutation block
let A = "0" + str;
let B = str + "0";
let C = "1" + str;
let D = str + "1";
const __ = {"DUMMY_INPUT"=true};
function isDummyInput(a) {
return (
a != null && typeof a === "object" && a["DUMMY_INPUT"] === true
);
}
function curry1(fn) {
return function f1(a) {