Skip to content

Instantly share code, notes, and snippets.

@alexchexes
alexchexes / chatgpt_ui_fix.user.js
Last active May 3, 2024 13:01
ChatGPT web-interface width fix (and other UI improvements)
// ==UserScript==
// @name ChatGPT CSS fixes
// @version 2024-02-11
// @updateURL https://gist.github.com/alexchexes/d2ff0b9137aa3ac9de8b0448138125ce/raw/chatgpt_ui_fix.user.js
// @downloadURL https://gist.github.com/alexchexes/d2ff0b9137aa3ac9de8b0448138125ce/raw/chatgpt_ui_fix.user.js
// @namespace http://tampermonkey.net/
// @description Adjusts width of side bar and messages of the chatGPT web interface
// @author alexchexes
// @match https://chat.openai.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
@pinheaded
pinheaded / cog_ext.py
Last active May 3, 2024 12:59
a basic cog + extension example for discord.py v2
from discord import app_commands
from discord.ext import commands
# all cogs inherit from this base class
class ExampleCog(commands.Cog):
def __init__(self, bot):
self.bot = bot # adding a bot attribute for easier access
# adding a command to the cog
@commands.command(name="ping")
@15696
15696 / cogs.py
Last active May 3, 2024 12:59
simple cogs example in discord.py
# main.py
from discord.ext import commands
import os
client = commands.Bot(command_prefix = "!")
for f in os.listdir("./cogs"):
if f.endswith(".py"):
client.load_extension("cogs." + f[:-3])
@TheSpydog
TheSpydog / fna-wasm-instructions.md
Last active May 3, 2024 12:57
How to build your FNA game for WebAssembly

How to build your FNA game for WebAssembly

WARNING: This process is EXTREMELY experimental and not officially supported yet!

Thanks to the ongoing work on .NET WebAssembly support, it is now possible to build FNA games for the web!

If you decide to give this a try, be sure to tell us about it in the FNA Discord! I'm happy to help if you run into problems or have any further questions that are not answered here.

The Basics

@ssrihari
ssrihari / clojure-learning-list.md
Last active May 3, 2024 12:57
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@utlandr
utlandr / biqu_microprobe.cfg
Last active May 3, 2024 12:54
Klipper probe config for the BIQU Microprobe (V1/V2)
## --- BIQU Microprobe Klipper configuration ---
# Not much different from a standard probe config. The
# main difference compared to most probes is to disable
# deactivating the probe (PROBE_UP) after each sample
#
# You can either copy pasta this directly or import
# into your config.yml using [include microprobe.cfg]
#
# Note: if you are changing from a bltouch or one of its
# clones, remove/comment out the [bltouch] config!
@v1mkss
v1mkss / JetBrains Activation.md
Last active May 3, 2024 12:53
JetBrains Activation

Choose any IDE from Jetbrains, then the activation window opens, go to the “Proxy Settings” and paste the following:

  • Manual proxy configuration http:
    • Hostname: localhost
    • port: 80
  • No proxy for:
*.apache.org, *.github.com, *.github.io, *.githubusercontent.com, *.gitlab.com, *.google.com, *.gradle.org, *.jetbrains.space, *.maven.org, cache-redirector.jetbrains.com, cloudconfig.jetbrains.com, download-cdn.jetbrains.com, download.jetbrains.com, downloads.marketplace.jetbrains.com, ea-report.jetbrains.com, github.com, gitlab.com, google.com, gradle.org, jcenter.bintray.com, plugins.jetbrains.com, resources.jetbrains.com, www.jetbrains.com

Find the current key for Jetbrains editions, and paste it into the activation code and that's it, enjoy your JetBrains infinite subscription

@plembo
plembo / ghpwithnamecheap.md
Last active May 3, 2024 12:51
GitHub Pages with Namecheap custom domain

Using GitHub Pages with a custom domain: Namecheap Edition

As often happens, I found the official documentation and forum answers to be "close, but no cigar", and so had to experiment a little to get things working.

The main problem for me was a lack of concrete configuration examples. That's not entirely GitHub's fault: having migrated from Google Domains to Namecheap in the middle of this project, I was once again reminded of how many different ways there are to do things in the name service universe [1].

Although you'd think the simplest setup would be to merely configure for the subdomain case (https://www.example.com), in my experience using the apex domain (https://example.com) instead resulted in fewer complications.

Procedure

So here's my recipe for using a custom domain with GitHub pages where Namecheap is the DNS provider:

@CatalanCabbage
CatalanCabbage / dvsj-in-about-you.tsx
Created February 15, 2024 06:46
WIP, about you component that gets data from your browser and eerily shows your data
import React, {useEffect, useRef, useState} from 'react';
import './About.css';
let textOptions = {
cookieEnabled: {
true: '',
false: 'You\'ve turned cookies off? Wow. ',
}, platform: {
win: 'Chillin\' on your Windows'
}, deviceMemory : {
@tomaytotomato
tomaytotomato / ArmA 3 Move Static Object
Created July 2, 2017 16:17
Script allows you to move a static object from one position to another using a time delay and speed
/**
Arguments
1 - object to move (non player object etc)
2 - starting position (use an invisible helipad)
3 - ending position (use an invisible helipad)
4 - move distance (metres)
5 - timing, i.e. speed
example : null = [this,posA,posB,1,0.001] execVM "move_object.sqf";