Skip to content

Instantly share code, notes, and snippets.

Commits go brrrr

Matt Cowley MattIPv4

Commits go brrrr
View GitHub Profile

Prism Patch

Rough guide to patch Prism such that it doesn't globally pollute.

Get Prism


View vue-prism-editor.scss
.prism-editor-wrapper {
width: 100%;
height: 100%;
display: flex;
align-items: flex-start;
overflow: auto;
tab-size: 1.5em;
-moz-tab-size: 1.5em;
.prism-editor__line-numbers {

DNS over Discord

Ever wanted to make DNS requests from the comfort of your Discord server? Well now you can, thanks to the @ bot.

To start using the DNS over Discord bot, invite it to your Discord server using this link:

The bot only requires basic permissions to read messages in your server and send messages to reply to the DNS queries.

Once the bot is in your server, you can mention it (@ followed by a domain name to begin making DNS requests. Provide DNS record types after the domain name to get back results for each record type. You can also use an asterisk ("*") in place of a record type to get back DNS results for all supported types.


Cloning specific folders of cdnjs

Due to the amount of libraries of cdnjs, the repository has a very big size. Because of this some might find it difficult or time and resource consuming to carry out normal git tasks, such as cloning and commiting.

This page is a guide to cloning only some folders of cdnjs using a sparse checkout.

  1. If you haven't already, fork cdnjs on GitHub, so you can push commits on your fork.
  2. Open a terminal in your computer (with git installed)
  3. Run git init cdnjs
  4. cd cdnjs
View quick.cpp
#include <iostream>
* Output the contents of an array.
* @param array the array of integers to output.
* @param last the size of the given array, or the "index" (1-based) of the last item in the array.
* @param first the index (0-based) of the first item in the array.
void print(int array[], int last, int first = 0)
View set_operations.cpp
* Exercise 3
* This project will serve as a utility to present SET operations. The investigated operations are:
namespace SetOps
* Determine if an integer is contained within a vector.
* @param items the vector of integers to search.
View nodejs-status.css
/* Base */
html {
font-size: 10px;
body {
color: var(--gray9);
font-family: var(--sans-serif);
font-size: 1.8rem;
View cdnjs-worker.js
addEventListener('fetch', event => {
async function fetchAndApply(request) {
const requestURL = new URL(request.url)
if(!requestURL.pathname.startsWith('/ajax/libs')) {
requestURL.pathname = '/ajax/libs' + requestURL.pathname
const newResponse = await fetch(requestURL, request)
if(newResponse.status == 200) return newResponse
View dark_slack.css
@import url(;
.menu ul li a:not(.inline_menu_link) {color: #fff !important;}
#p_thread_view_container > .p-threads_view { background-color: #222; }
#p_thread_view_container > .p-threads_view .p-threads_view_header__permalink { color: #e6e6e6 !important; }
#p_thread_view_container > .p-threads_view .p-threads_view__default_background { background-color: #222; }

cdnjs April 2019 Usage Stats

Information provided directly by Cloudflare for the domain. ⛅️

Key Highlights

  • cdnjs served over 160 billion requests in April 2019.
  • During the month we used over 2.6 petabytes of bandwidth to serve these requests.
  • That is over 89 terabytes of data and 5 billion requests each day.

Library Highlights

  • jQuery (3.3.1) was once again the top library with over 6 billion requests for the single file.