Skip to content

Instantly share code, notes, and snippets.

@eduwass
eduwass / readme.md
Last active May 2, 2024 19:00
force 5g wifi on mac

Force 5 GHz WiFi Connection on macOS

If you're experiencing issues with your Mac connecting to the slower 2G band on routers that share SSID between 5G/2G (like the Google Wifi Nest), here's a guide to help you force a 5 GHz connection.

Identifying the 5G Channel

  1. Check Current Band: Hold option and click on the wifi icon on the macOS status bar. This will display the band you are currently connected to.
  2. Scan WiFi Channels: Use the following command to list all channels your WiFi is operating on:
    /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport scan
@drozzy
drozzy / README.md
Last active May 2, 2024 18:59
FMC (http://www.fmc-modeling.org/) compositional and dynamic elements draw.io libraries

ABOUT

This is just some stencils I created for myself to draw FMC (http://www.fmc-modeling.org/) diagrams with draw.io.

Here is how they look:

lib_fmc_compositional

lib_fmc_dynamic

@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 2, 2024 18:58
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@regner
regner / BuildProject.xml
Last active May 2, 2024 18:57
A sample BuildGraph script for building, cooking, and packaging an Unreal project.
<?xml version='1.0' ?>
<!--
Why is this one giant script instead of a bunch of smaller scripts?
Mostly this comes down to BuildGraph and personal preference. As the language BuildGraph isn't
really much of a programming language there is no easy way to use an IDE and jump between
includes, find usages of variables, and just generally quickly search things. It was found to
be easier to have a single large file that a developer can quickly jump up and down in when
trying to understand what the BuildGraph script is doing.
@akitaonrails
akitaonrails / win11.xml
Created January 17, 2023 16:29
My Windows 11 libvirt XML configuration
<domain type='kvm'>
<name>win11-real</name>
<uuid>45768371-b871-4937-b7c2-60ed835011de</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
@inxilpro
inxilpro / README.md
Created July 22, 2022 21:01
Fully namespaced Tailwind config for widget or embeddable component

Sometimes you need to publish a CSS file for 3rd-party consumption (i.e. default styles for an embeddable JS widget). This set up lets you continue to use Tailwind, but scope all your styles to a specific selector.

Simply replace .internachi with your own widget namespace, set up Tailwind as you please, and run generate.sh to build a custom version of your Tailwind styles that won't interfere with other CSS rules (including the Tailwind reset).

@alepez
alepez / fix.md
Created November 25, 2016 13:59
Ubuntu 16.04 (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
sudo apt-get install xserver-xorg-legacy

Edit /etc/X11/Xwrapper.config

allowed_users=anybody
needs_root_rights=yes
@jpatrickdill
jpatrickdill / undeleter.js
Last active May 2, 2024 18:52
Listens for deleted messages on discord and dumps them to a channel.
const Discord = require("discord.js");
const client = new Discord.Client();
const config = require("./config.json"); // config from file
/* example config.json:
{
"token": "abcdefghijklmnopqrstuvwxyz", // user or bot token,
"listenTo": ["167423382697148416", "353615025589714946", "210321071511961600"], // list of channel OR guild id's
@hootan09
hootan09 / Python-sample.md
Last active May 2, 2024 18:51
Python Basic Command

Python Basic to Advanced Commands & Code

[Import other python files]

You want to import file A.py in file B.py, these two files are in the same folder, like this:

. 
├── A.py 
└── B.py
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active May 2, 2024 18:49
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none