Skip to content

Instantly share code, notes, and snippets.

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
import "@openzeppelin/[email protected]/token/ERC20/IERC20.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
interface TokenInterface {
function allowance(address owner, address spender) external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function decimals() external view returns (uint8);
@MicahParks
MicahParks / go get private GitLab with group and subgroup (Golang modules).md
Last active April 15, 2025 17:10
go get private GitLab with group and subgroup (Golang modules)

Problem

The go command line tool needs to be able to fetch dependencies from your private GitLab, but authenticaiton is required.

This assumes your private GitLab is hosted at privategitlab.company.com.

Environment variables

The following environment variables are recommended:

export GO111MODULE=on
export GOPRIVATE=privategitlab.company.com
@m00nbyte
m00nbyte / openvpn-traffic-control.sh
Created April 15, 2025 17:03
OpenVPN Traffic Control
#!/bin/bash
# ======================================================================================
#
# © 2025 m00nbyte
#
# Script Name: openvpn-traffic-control.sh
# Description: Manage bandwidth limits and traffic quotas for OpenVPN clients.
# Author: m00nbyte
# Date Created: 2024-11-11
@trisberg
trisberg / local-registry.md
Last active April 15, 2025 17:01
Using a Local Registry with Minikube

Using a Local Registry with Minikube

Install a local Registry

These instructions include running a local registry accessible from Kubernetes as well as from the host development machine at registry.dev.svc.cluster.local:5000.

  1. Use the docker CLI to run the registry:2 container from Docker, listening on port 5000, and persisting images in the ~/.registry/storage directory.
@kcramer
kcramer / OTPTestCodes.md
Last active April 15, 2025 17:00
OTP Test Codes

OTP Test Codes

Sample OTP QR Codes

The following sample codes are not valid for the listed services but should allow basic testing of an authenticator application. Clicking on a QR code image will display just that code so it is easier to scan without interference from the other codes.

You can use this site to generate more QR codes as needed. It will also let you verify the produced codes against its own calculated code.

@iamkevinv
iamkevinv / .block
Last active April 15, 2025 16:59 — forked from mbostock/.block
Zoom to Bounding Box II - Updated for d3 v4
license: gpl-3.0
@opragel
opragel / macos_keyboard_shortcuts.md
Last active April 15, 2025 16:55
macOS favorite keyboard shortcuts

macOS keyboard shortcut favorites

Legend

Command (or Cmd)  - ⌘
Control (or Ctrl) - ^
Option (or Alt)   - ⌥
Shift             - ⇧
Fn (Function)     - 🌐
@codebrainz
codebrainz / c99.l
Created June 14, 2012 23:49
C99 Lex/Flex & YACC/Bison Grammars
D [0-9]
L [a-zA-Z_]
H [a-fA-F0-9]
E ([Ee][+-]?{D}+)
P ([Pp][+-]?{D}+)
FS (f|F|l|L)
IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U))
%{
#include <stdio.h>
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 15, 2025 16:52
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