Skip to content

Instantly share code, notes, and snippets.

View kevinfiol's full-sized avatar
🌔
man on the moon

kevinfiol

🌔
man on the moon
View GitHub Profile
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
let
unstableTarball =
fetchTarball
https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
@kevinfiol
kevinfiol / serve.ts
Last active November 21, 2023 04:40
import { walk, existsSync } from 'https://deno.land/std@0.204.0/fs/mod.ts';
import { resolve, globToRegExp, join } from 'https://deno.land/std@0.204.0/path/mod.ts';
import { serveFile } from "https://deno.land/std@0.204.0/http/file_server.ts";
const FALLBACK = Deno.env.get('SPA_FALLBACK') || '';
const SPA_GLOBS = Deno.env.get('SPA_GLOBS') || '';
const FILES = new Map<string, string>();
const ROOT = resolve('.');
const IGNORE_GLOBS = ['**/.git/**/*', '**/.git'];
@kevinfiol
kevinfiol / denam.js
Created September 11, 2023 15:07
vyce but with a getter setter api
let comps = [],
isFn = x => typeof x === 'function';
function store(init) {
let $,
x = init,
subs = [];
return $ = {
get value() {
@kevinfiol
kevinfiol / README.md
Last active August 30, 2023 02:04
forcing HTML google

Add this uBlock Origin filter:

||google.com/search$csp=script-src 'none'

On Windows, I had to set this as the custom search URL:

https://www.google.com/search?q=%s&gbv=1&sei=1
@kevinfiol
kevinfiol / esbuild.js
Created August 1, 2023 12:52
esbuild transformer
// thank you hannoeru/jest-esbuild !!! :D
// copied and adjusted from https://github.com/hannoeru/jest-esbuild/blob/f65ca935e335192cfbf4324ebfde42197193a68d/src/index.ts
// jest mocking doesnt work, but we dont need it anyway
const { extname } = require("path");
const { createHash } = require("crypto");
const { transformSync } = require("esbuild");
const { readFileSync } = require("fs");
@kevinfiol
kevinfiol / scrape.js
Created April 6, 2023 04:21
scrape tw
import { resolve } from 'node:path';
import { writeFileSync } from 'node:fs';
import { parseHTML } from 'linkedom';
// failed: dark-mode, container, gradient-color-stops
const pages = new Set([
'accent-color',
'align-content',
'align-items',
{
"accent-inherit": "accent-color: inherit;",
"accent-current": "accent-color: currentColor;",
"accent-transparent": "accent-color: transparent;",
"accent-black": "accent-color: #000;",
"accent-white": "accent-color: #fff;",
"accent-slate-50": "accent-color: #f8fafc;",
"accent-slate-100": "accent-color: #f1f5f9;",
"accent-slate-200": "accent-color: #e2e8f0;",
"accent-slate-300": "accent-color: #cbd5e1;",
@kevinfiol
kevinfiol / oh-my-posh-conf.json
Last active January 12, 2024 04:31
powershell (put in C:\Users\kevin\Documents\PowerShell)
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#81A1C1",
"properties": {

[test](aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

@kevinfiol
kevinfiol / build.js
Created January 22, 2023 21:54
esbuild w context
/** @type {esbuild.BuildOptions} **/
const config = {
format: 'iife',
entryPoints: [ENTRY],
outfile: OUTFILE,
bundle: false,
plugins: [{
name: 'on-end',
setup(build) {
build.onEnd(({ errors }) => {