Skip to content

Instantly share code, notes, and snippets.

@nc9
nc9 / _README.md
Last active December 10, 2025 04:18
vercel bun runtime setup with nextjs

enables vercel bun runtime with fluid compute for nextjs

note the dev and build run script in package.json

set the vercel.json file in project root and update the package.json run entry points for dev and build

@nc9
nc9 / myip.py
Created November 24, 2025 23:51
Command line script to get IP and geo info from cloudflare
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "requests",
# "pydantic",
# "rich",
# ]
# ///
"""
@nc9
nc9 / _INSTALL.md
Last active May 8, 2024 20:39
Convert video files into WhatsApp compatible format

Convert Video File To WhatsApp Compatible Format

This script uses ffmpeg to convert video files to a WhatsApp compatible format. Will also compress the size down making it more suitable.

Install

Ensure you have ffmpeg installed:

$ brew install ffmpeg
@nc9
nc9 / schemas.xmlsoap.org.xml
Created April 30, 2024 07:04
schemas.xmlsoap.org/soap/encoding/ mirror
<?xml version="1.0" encoding="UTF-8"?>
<!-- Schema for the SOAP/1.1 encoding
Portions © 2001 DevelopMentor.
© 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
This document is governed by the W3C Software License [1] as described in the FAQ [2].
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
@nc9
nc9 / cloudflare_delete_dns.py
Last active April 14, 2024 15:44
Script to delete all DNS records for a cloudflare domain
#!/usr/bin/env python
#
# script to delete all dns records for a zone in cloudflare
#
# usage:
# cloudflare_delete_dns.py <domain> [api_token]
#
# api_token is optional, if not provided, it will be read from the CLOUDFLARE_API_TOKEN environment variable
#
# requires cloudflare library, install with
@nc9
nc9 / dropbox_resolve_conflicts.py
Created March 6, 2023 23:23
dropbox conflicted file resolver
#!/usr/bin/env python
"""
Script to de-conflict Dropbox conflicted files
Usage:
dropbox-fix-conflicts [options] <file_path>
Options:
-h --help Show this screen.
code network_id network_region fueltech_id emissions_factor_co2 emission_factor_source
AGLNOW1 NEM NSW1 bioenergy_biogas 0.062
AGLSITA1 NEM NSW1 bioenergy_biogas 0.062
AWABAREF NEM NSW1 bioenergy_biogas 0.062
BWTR1 NEM NSW1 bioenergy_biogas 0.018
CONDONG1 NEM NSW1 bioenergy_biogas 0.018
EASTCRK NEM NSW1 bioenergy_biogas 0.062
EASTCRK2 NEM NSW1 bioenergy_biogas 0.062
GRANGEAV NEM NSW1 bioenergy_biogas 0.062
JACKSGUL NEM NSW1 bioenergy_biogas 0.062
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 14 columns, instead of 13 in line 7.
Reporting entity,Facility name,Type,State,Electricity production (GJ),Electricity production (MWh),"Total scope 1 emissions
(t CO2-e)","Total scope 2 emissions (t CO2-e)","Total emissions (t CO2-e)","Emission intensity (t CO2-e/ MWh)",Grid connected,Grid,Primary fuel,Important notes
ACCIONA ENERGY OCEANIA PTY LTD,Cathedral Rocks Wind Farm,F,SA,"555,151","154,209",50,95,145,0,On,NEM,Wind,-
ACCIONA ENERGY OCEANIA PTY LTD,Gunning Wind Farm,F,NSW,"636,185","176,718",45,143,188,0,On,NEM,Wind,-
ACCIONA ENERGY OCEANIA PTY LTD,Mt Gellibrand Wind Farm,F,VIC,"1,086,174","301,715",49,308,357,0,On,NEM,Wind,-
ACCIONA ENERGY OCEANIA PTY LTD,Waubra Wind Farm,F,VIC,"2,414,107","670,585",139,452,591,0,On,NEM,Wind,-
ACCIONA ENERGY OCEANIA PTY LTD,Corporate Total,C,-,"4,691,617","1,303,227",283,998,"1,281",-,-,-,-,-
ADANI RENEWABLE ASSET HOLDINGS PTY LTD,Adani Rugby Run Solar Farm,F,QLD,"589,185","163,662",0,0,0,0,On,NEM,Solar,-
ADANI RENEWABLE ASSET HOLDINGS PTY LTD,Corporate Total,C,-,"589,185","163,662",0,0,0,-,-,-,-
@nc9
nc9 / keybase.md
Created June 26, 2022 22:32
keybase

Keybase proof

I hereby claim:

  • I am nc9 on github.
  • I am cubrilovic (https://keybase.io/cubrilovic) on keybase.
  • I have a public key whose fingerprint is C786 A290 049E B59E 959B B28F CE77 0A38 2EF1 0EE9

To claim this, I am signing this object:

@nc9
nc9 / 0001-FEAT-limitsize-patch.patch
Last active August 28, 2021 22:20
wget limit-size option patch
From 7f80eb9011b20a8712601e0db640711aa9b3b18d Mon Sep 17 00:00:00 2001
From: Nik Cubrilovic <git@nikcub.me>
Date: Sun, 29 Aug 2021 07:55:56 +1000
Subject: [PATCH] FEAT: limitsize patch
FEAT: limit_size option
---
src/ftp.c | 8 ++++++++
src/http.c | 8 ++++++++
src/init.c | 1 +