Skip to content

Instantly share code, notes, and snippets.

View iDanielLaw's full-sized avatar

Daniel Law iDanielLaw

  • Imagine No Limit Technology
View GitHub Profile
@int128
int128 / README.md
Last active April 12, 2025 13:02
Example of Envoy TCP Proxy
@elct9620
elct9620 / app-tinygo.js
Last active November 3, 2024 14:41
Define JavaScript class inside Golang (WebAssembly)
import 'vendor/tinygo'
const go = new Go();
go.importObject.env['main.defineClass'] = function(namePtr, nameLen, cPtr, cGcPtr, pPtr/*, pGcPtr*/) {
const mem = new DataView(go._inst.exports.memory.buffer)
const decoder = new TextDecoder("utf-8");
const name = decoder.decode(new DataView(go._inst.exports.memory.buffer, namePtr, nameLen));
const constructorID = mem.getUint32(cPtr, true)
@embedded4ever
embedded4ever / tftp.ino
Last active June 28, 2020 11:51
ESP8266 Tftp Implementation
//[email protected] wrote this file
/*
2 bytes string 1 byte string 1 byte
-----------------------------------------------
RRQ/ | 01/02 | Filename | 0 | Mode | 0 |
WRQ -----------------------------------------------
@nasirhafeez
nasirhafeez / freeradius-advanced-use-cases.md
Last active March 30, 2025 16:11
FreeRADIUS Advanced Use Cases
@acoshift
acoshift / main.go
Created May 20, 2020 05:14
[Golang] Mask struct by role using struct tag
package main
import (
"encoding/json"
"fmt"
"os"
"reflect"
"strings"
)
@oskar456
oskar456 / wgcf.py
Last active December 20, 2024 23:13
Cloudflare WARP linux client (using wg-quick for actual tunnel setup)
#!/usr/bin/env python3
import subprocess
import json
import os
from pathlib import Path
import requests
from requests.compat import urljoin
@heygrady
heygrady / redux-module-patterns.md
Last active March 5, 2021 19:48
Redux module patterns: app state, view state and regional state

Redux module patterns

app state, view state and regional state

separating components and containers

and code-splitting reducers


@Huzver
Huzver / make-chr.sh
Last active December 4, 2023 05:30 — forked from stroebs/make-chr.sh
Install Mikrotik CHR on a Digital Ocean droplet
#!/bin/bash
#
# Digital Ocean Ubuntu 16.04.6 Droplet
# Please run these command before running the script
# apt update && apt full-upgrade -y && apt install -y qemu-utils pv
#
# wget script
#
# Run script
# chmod +x make-chr.sh