Skip to content

Instantly share code, notes, and snippets.

.nyc_output
coverage
node_modules
package-lock.json
@yoursunny
yoursunny / halloween2019.ino
Last active October 30, 2019 02:17
Halloween 2019 ODROID-GO sketch
/*
Halloween 2019 ODROID-GO sketch
- press A button: draw pumpkin with random color
- press B button: draw pumpkin with realistic color
- press MENU button: display QR code of source code link
*/
#include <odroid_go.h>
@yoursunny
yoursunny / ndn-fch.worker.js
Last active December 26, 2019 03:08
NDN-FCH on Cloudflare Workers https://ndn-fch.yoursunny.workers.dev/
const IPGEOLOCATION_IO_APIKEY = "INSERT-APIKEY-HERE";
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
});
async function getGeoLocation(ip) {
const url = new URL("https://api.ipgeolocation.io/ipgeo");
url.searchParams.set("apiKey", IPGEOLOCATION_IO_APIKEY);
url.searchParams.set("ip", ip);
@yoursunny
yoursunny / get-pip.py
Created January 21, 2020 14:56
copy of https://bootstrap.pypa.io/get-pip.py retrieved on 2020-01-21
This file has been truncated, but you can view the full file.
#!/usr/bin/env python
#
# Hi There!
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we're up to something nefarious (good for you for being
# paranoid!). This is a base85 encoding of a zip file, this zip file contains
# an entire copy of pip (version 19.3.1).
#
# Pip is a thing that installs packages, pip itself is a package that someone
# might want to install, especially if they're looking to run this get-pip.py
@yoursunny
yoursunny / boost-info-20200603.tgz
Last active June 4, 2020 00:39
boost-info package
@yoursunny
yoursunny / index.d.ts
Created June 5, 2020 20:41
@types/root__asn1
// Type definitions for @root/asn1 1.0
// Project: https://git.coolaj86.com/coolaj86/asn1.js
// Definitions by: Junxiao Shi <https://github.com/yoursunny>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.7
export {};
interface Element<V extends string|Uint8Array> {
type: number;
b = 0
m_bits = 5
m_max = (1<<m_bits)
for i in range(0,256):
e = i >> m_bits
m = i & ((1<<m_bits) - 1)
if e == 0:
x = (0 + m / m_max) * pow(2, 1 + b)
@yoursunny
yoursunny / ca-profile.data.base64
Last active August 29, 2025 16:14
yoursunny.com NDNts-CA profile
Bv0CGgcmCANuZG4ICDIwMjUwODI5CAJDQQgESU5GTzYIAAABmPabML8yAQAUCxkEADbugBoDMgEA
Ff0BXoERBw8IA25kbggIMjAyNTA4MjmDAIsEAHanAIn9AT8G/QE7BzEIA25kbggIMjAyNTA4MjkI
A0tFWTgIAAY9g0rcYdgIB05ETkNFUlQ2CAAAAZj2muCmFAkYAQIZBAA27oAVWzBZMBMGByqGSM49
AgEGCCqGSM49AwEHA0IABCdpaRXsmL6CZDCxxhSjYkXKS1NYdm84M+cX11hGGvl5wEVGxGBKcin+
RESS9HtZROZCw0jZF+MBmVhbb/EnisYWVBsBAxwlByMIA25kbggDS0VZCAgnxLIqn3uBJwgDbmRu
NggAAAGAdfpztP0A/Sb9AP4PMjAyNTA4MjlUMTYxMzAy/QD/DzIwMjUxMTI3VDE2MTMwMhdIMEYC
IQDUDJInpcTEHqQhq9kS/61ThZR8hO2t9YRSxop+lua2ggIhALtGudlQnwn64KdqhmbsgfufNxVH
iu93TzzrFfbzF3cwFjgbAQMcMwcxCANuZG4ICDIwMjUwODI5CANLRVk4CAAGPYNK3GHYCAdORE5D
RVJUNggAAAGY9prgphdHMEUCIQC3iRVIGdsaS5PGZcj8Cc/RFeo3vqsTdkjUV12bXcu3uAIgELvE
uMudJyCYaCd9L7S3ItJG7Od80JtwtYqj85h4tgc=
@yoursunny
yoursunny / .gitignore
Last active February 4, 2021 03:10
The Reality of NDN Video Streaming https://yoursunny.com/t/2021/NDN-video-reality/
*.mmdb
*.ndjson
.vscode
__pycache__