Skip to content

Instantly share code, notes, and snippets.

View pvinis's full-sized avatar
🔭
hello?

Pavlos Vinieratos pvinis

🔭
hello?
View GitHub Profile
@pvinis
pvinis / browsers.md
Created August 1, 2023 16:13
browsers
@kendallroth
kendallroth / forward_wsl2_ports.ps1
Last active March 5, 2024 16:04
Forward WSL2 ports to host
# Forward WSL2 ports to host machine/platform (handles Windows Firewall)
#
# NOTE: 'iex' is a shortform for 'Invoke-Expression'
# Ports that should be forwarded to WSL2 and allowed through firewall (comma-separated)
$ports = @(8081);
# WSL IP address changes whenever WSL restarts
$wsl_ip = $(wsl hostname -I).Trim();

General plan

  1. Meet in Zoom from the cal invite
  2. Introduce the games
  3. Decide on game(s) depending on how many people we have + interest
  4. Split off into one or more game lobbies, plus a cozyroom

Possible games

import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
<div
@delphinus
delphinus / colorwheel.vim
Last active October 18, 2020 13:02
Draw color wheel in NeoVim
const s:pi2 = 2 * 3.14159265
" pixel_ratio means the ratio of the character size.
const s:pixel_ratio = 2.0 / 1.0
" ColorWheel draws a color wheel
function! ColorWheel() abort
const [center_x, center_y] = [&columns / 2.0, &lines / 2.0]
const radius = min([&columns, &lines]) / 8.0 * 3
" loop over the distance multiplied by pixel_ratio in the horizontal
" direction because the character has a rectangular shape.
@bmhatfield
bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@bhauman
bhauman / core.cljs
Last active August 16, 2022 12:08
Helpful patterns when developing with ClojureScript Figwheel and Express js
(ns todo-server.core
(:require
[cljs.nodejs :as nodejs]
[figwheel.client :as fw]))
(nodejs/enable-util-print!)
(defonce express (nodejs/require "express"))
(defonce serve-static (nodejs/require "serve-static"))
(defonce http (nodejs/require "http"))
{ config, pkgs, ... }:
{
require = [
<nixos/modules/programs/virtualbox.nix>
./hardware.nix
./monitors.nix
# ./mailpile.nix
];
@passcod
passcod / MOVE.md
Last active August 29, 2015 13:56
firefox-always-nightly in the AUR