Skip to content

Instantly share code, notes, and snippets.

View tunnckoCore's full-sized avatar
🔒
Fighting for freedom, security and privacy 🔐

Charlike Mike Reagent tunnckoCore

🔒
Fighting for freedom, security and privacy 🔐
View GitHub Profile
@shobhitic
shobhitic / index.html
Created January 30, 2022 07:47
Wallet Connect Integration Code - https://youtu.be/Ws5jIo4NMDc
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Wallet Connect</title>
<script src="https://cdn.jsdelivr.net/npm/@walletconnect/[email protected]/dist/umd/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
</head>
<body>
// Head over to https://github.com/rigwild/anons-secret-nft :)
@mayankchoubey
mayankchoubey / deno_receive_complex_form_data.ts
Last active December 2, 2022 02:27
Deno vs Node: Multipart/form-data with fields and files
import {readerFromStreamReader, copy} from "https://deno.land/std/streams/mod.ts";
const basePath=Deno.env.get('TMPDIR');
const listener = Deno.listen({ port: 3000 });
for await(const conn of listener)
handleNewConnection(conn);
async function handleNewConnection(conn: Deno.Conn) {
for await(const { request, respondWith } of Deno.serveHttp(conn)) {
const reqBody=await request.formData();
@privatenumber
privatenumber / light-dark-image.svg
Last active October 22, 2024 05:40
Light/dark mode SVG image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sindresorhus
sindresorhus / esm-package.md
Last active June 28, 2025 20:09
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@cryptoscopia
cryptoscopia / dydxFlashLoanTemplate.sol
Created October 21, 2020 06:42
A single-file simplest possible template for a contract that obtains a flash loan from dydx, does things, and pays it back.
// SPDX-License-Identifier: AGPL-3.0-or-later
// The ABI encoder is necessary, but older Solidity versions should work
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
// These definitions are taken from across multiple dydx contracts, and are
// limited to just the bare minimum necessary to make flash loans work.
library Types {
enum AssetDenomination { Wei, Par }
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active June 21, 2025 03:17
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@neisdev
neisdev / index.html
Created August 3, 2020 04:42
Tailwind CSS - Twitter Clone
<body class="bg-grey-light font-sans">
<div class="bg-white">
<div class="container mx-auto flex flex-col lg:flex-row items-center py-4">
<nav class="w-full lg:w-2/5">
<a href="#" class="text-grey-darker text-sm mr-4 font-semibold pb-6 border-b-2 border-solid border-transparent no-underline hover:text-teal hover:border-teal hover:no-underline"><i class="fa fa-home fa-lg"></i> Home</a>
<a href="#" class="text-grey-darker text-sm mr-4 font-semibold pb-6 border-b-2 border-solid border-transparent no-underline hover:text-teal hover:border-teal hover:no-underline"><i class="fa fa-bolt fa-lg"></i> Moments</a>
<a href="#" class="text-grey-darker text-sm mr-4 font-semibold pb-6 border-b-2 border-solid border-transparent no-underline hover:text-teal hover:border-teal hover:no-underline"><i class="fa fa-bell fa-lg"></i> Notifications</a>
<a href="#" class="text-grey-darker text-sm mr-4 font-semibold pb-6 border-b-2 border-solid bord
@danba340
danba340 / server.js
Last active October 20, 2022 16:43
import { Application } from "https://deno.land/x/oak/mod.ts";
import { applyGraphQL, gql } from "https://deno.land/x/oak_graphql/mod.ts";
const app = new Application();
const types = gql`
type Dino {
name: String
image: String
}
@Amooti73
Amooti73 / dict.sh
Last active October 5, 2023 23:08
Click and drag to select a word on the screen and send it to rofi to display its definition with sdcv
#!/bin/bash
# Dependencies: tesseract-ocr imagemagick scrot xsel rofi
set -e
SCR_IMG=$(mktemp)
trap 'rm $SCR_IMG*' EXIT
scrot -s "$SCR_IMG.png"
mogrify -modulate 100,0 -resize 400% "$SCR_IMG.png" #should increase detection rate
tesseract "$SCR_IMG.png" "$SCR_IMG" &> /dev/null