Skip to content

Instantly share code, notes, and snippets.

View gamemaker1's full-sized avatar

Vedant Kulkarni gamemaker1

View GitHub Profile
@OverHash
OverHash / main.rs
Created July 10, 2022 23:22
Minecraft OAuth Authentication Rust Example
use std::{
collections::HashMap,
fs,
io::{self, Write},
};
use reqwest::Client;
use serde::{Deserialize, Serialize};
use serde_json::json;
@sindresorhus
sindresorhus / esm-package.md
Last active July 22, 2024 00:46
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.
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 22, 2024 05:32
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

const meow = require('meow')
const prop = k => o => o[k]
const pipe = (...fns) => x => [...fns].reduce((acc, f) => f(acc), x)
const siconstore = () => ({
cli: meow(`
Usage
$ siconstore [command]
Available Commands
@wandernauta
wandernauta / sp
Last active July 10, 2024 07:57
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#