Skip to content

Instantly share code, notes, and snippets.

@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
@devyfriend
devyfriend / MY_Router.php
Created January 11, 2013 13:55
Codeigniter DB Router for Modular
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
/* load the MX_Router class */
require APPPATH."third_party/MX/Router.php";
class MY_Router extends MX_Router {
function _set_routing()
{
// Are query strings enabled in the config file? Normally CI doesn't utilize query strings
@lorentey
lorentey / noncopyable-stdlib-primitives.md
Last active May 2, 2024 18:49
Noncopyable Standard Library Primitives (draft proposal)

Noncopyable Standard Library Primitives

  • Proposal: SE-NNNN
  • Authors: Karoy Lorentey
  • Review Manager: TBD
  • Status: Forum pitch
  • Roadmap: [Improving Swift performance predictability: ARC improvements and ownership control][Roadmap]
  • Implementation: On main and release/6.0, gated behind -enable-experimental-feature NoncopyableGenerics
  • Pitch thread: (pitch)
@JySzE
JySzE / mpv.conf
Last active May 2, 2024 18:47
JySzE MPV Config
# Version 2.4
# 05/02/2024
# Adjust as needed.
input-ar-delay = 500
input-ar-rate = 20
keep-open = yes
keep-open-pause = no
osd-duration = 1500
@wouterdebie
wouterdebie / comfyui_macos.sh
Last active May 2, 2024 18:47
ComfyUI MacOS Apple Silicon install
#!/bin/bash
set -e
brew install llvm libomp python@3.11
export CC=$(brew ls --verbose llvm | grep -e 'bin/clang$')
export CXX=$(brew ls --verbose llvm | grep -e 'bin/clang++$')
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
python3.11 -m venv venv
@nukadelic
nukadelic / EditorFontSize.cs
Last active May 2, 2024 18:45
Unity Editor Font Size Changer -- EditorStyles
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class EditorFontSize : EditorWindow
{
// enable resize on launch to set a default font size , using this option will disable the ability to have the window accassible