Skip to content

Instantly share code, notes, and snippets.

View ocfox's full-sized avatar
🏖️

ocfox ocfox

🏖️
View GitHub Profile
@ocfox
ocfox / userChrome.css
Created September 26, 2025 18:06
userChrome.css
:root {
--sfwindow: #272e33E6;
--sfsecondary: #272e33E6;
--browser-background: transparent !important;
}
/* Tabs colors */
#tabbrowser-tabs:not([movingtab])>#tabbrowser-arrowscrollbox>.tabbrowser-tab>.tab-stack>.tab-background[multiselected='true'],
#tabbrowser-tabs:not([movingtab])>#tabbrowser-arrowscrollbox>.tabbrowser-tab>.tab-stack>.tab-background[selected='true'] {
background-image: none !important;
@ocfox
ocfox / bilibili-pk-bar-remove.js
Last active February 22, 2025 15:13
Remove bilibili live pk bar
// ==UserScript==
// @name Remove bilibili live PK Bar
// @namespace Violentmonkey Scripts
// @match https://live.bilibili.com/*
// @grant none
// @version 1.0
// @author ocfox
// @description 2/22/2025, 10:32:10 PM
// ==/UserScript==
@ocfox
ocfox / json2nix.py
Last active January 18, 2024 13:47 — forked from spencerpogo/json2nix.py
Converts JSON objects into nix (hackishly).
"""Converts JSON objects into nix (hackishly)."""
import sys
import json
INDENT = " " * 2
def strip_comments(t):
@ocfox
ocfox / laplace.txt
Last active March 28, 2023 03:28
radar-smoothing
258590.1900 470574.4900 53.3612
258590.3300 470574.7300 53.3612
258590.4700 470574.9600 53.4500
258590.6200 470575.2000 53.4500
258590.7600 470575.4300 53.2623
258590.8900 470575.6300 53.2623
258590.1000 470576.0700 53.5000
258591.1000 470576.0400 53.5200
258590.2500 470576.3200 53.3921
258591.2900 470576.4000 53.4000
@ocfox
ocfox / solver.jl
Last active August 27, 2022 03:59
1A2B-solver
using Base: parse_input_line, prompt
using Combinatorics
function gene_anspool(len::Int)
collect(permutations(vcat(0:9), len))
end
function main()
anspool = gene_anspool(parse(Int, prompt("Game number length")))
work_problem_ab(anspool)
@ocfox
ocfox / wpa_cli
Created April 9, 2022 05:39 — forked from buhman/00 wpa_cli passphrase network
wpa_cli example; it might be worth mention that you can tab-complete all wpa_supplicant commands
[zack@leto ~]$ sudo tee << EOF /etc/wpa_supplicant.conf > /dev/null
ctrl_interface=/run/wpa_supplicant
EOF
[zack@leto ~]$ sudo wpa_supplicant -iwlp1s0 -Dnl80211 -c/etc/wpa_supplicant.conf -B
Successfully initialized wpa_supplicant
[zack@leto ~]$ sudo wpa_cli
wpa_cli v2.0
Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi> and contributors
This software may be distributed under the terms of the BSD license.
@ocfox
ocfox / triangles.cpp
Created March 23, 2022 01:35
OpenGL triangles try
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <bits/stdc++.h>
void framebuffer_size_callback(GLFWwindow *window, int width, int height);
void processInput(GLFWwindow *window);
// settings
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;