Skip to content

Instantly share code, notes, and snippets.

m13253 /
Created Apr 10, 2020
List proxy server status on macOS
#!/usr/bin/env bash
networksetup -listallnetworkservices | tail +2 |
echo 'Network service: '$'\e[34m'"$NETWORK_SERVICE"$'\e[0m'
networksetup -getproxyautodiscovery "$NETWORK_SERVICE" | sed 's/^/[WPAD] /'
networksetup -getautoproxyurl "$NETWORK_SERVICE" | sed 's/^/[PAC] /'
networksetup -getwebproxy "$NETWORK_SERVICE" | sed 's/^/[HTTP] /'
networksetup -getsecurewebproxy "$NETWORK_SERVICE" | sed 's/^/[HTTPS] /'
m13253 /
Created Jan 22, 2020
Change Android captive portal detection to Xiaomi's server
adb shell settings put global captive_portal_https_url
adb shell settings put global captive_portal_http_url
m13253 / mousetest.js
Created Nov 11, 2019
A mouse test program written in gjs (Gtk+ JavaScript)
View mousetest.js
const GObject =;
const Gdk =;
const Gtk =;
const Lang = imports.lang;
const MouseTest = new Lang.Class({
Name: "Mouse Test",
View transparent-x11.c
#include <X11/Xlib.h>
#include <X11/Xutil.h>
int main(int argc, char* argv[])
Display* display = XOpenDisplay(NULL);
XVisualInfo vinfo;
XMatchVisualInfo(display, DefaultScreen(display), 32, TrueColor, &vinfo);
m13253 / bird-dn42-util.conf
Last active Jul 24, 2019
BIRD 2.0 utility for DN42 related operations
View bird-dn42-util.conf
# BIRD 2.0 utility for DN42 related operations
# To be used with:
# include "bird-dn42-util.conf";
# in bird.conf main configuration file.
function reset_origin (int transit; int origin)
m13253 /
Last active Aug 2, 2018
Minimal working initramfs for BusyBox, with login
#!/bin/busybox sh
# 1) Download a prebuilt BusyBox binary here:
# 2) Prepare your kernel
# cp /boot/vmlinuz vmlinuz
# 3) Copy the files
# install -Dm0755 busybox-x86_64 initramfs/bin/busybox
View dns-test.go
package main
import (
func main() {
err := dns.ListenAndServe(":5533", "udp", dns.HandlerFunc(handler))
if err != nil {
m13253 / TagCloud.pde
Created May 20, 2017
Program to draw a rotating tag cloud, using Processing schetchbook
View TagCloud.pde
Copyright (C) 2017 StarBrilliant <>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
m13253 /
Created Apr 28, 2017 — forked from endel/
FontForge script to convert .ttf file to its webfont variations (.otf, .svg, .woff, .woff2)
Generate($1:r + ".otf")
Generate($1:r + ".svg")
Generate($1:r + ".woff")
Generate($1:r + ".woff2")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <queue>
#include <unistd.h>
#include <utility>
#include <vector>
You can’t perform that action at this time.