Skip to content

Instantly share code, notes, and snippets.

View alancnet's full-sized avatar
🧙
Making the magic happen

alancnet

🧙
Making the magic happen
View GitHub Profile
@alancnet
alancnet / remote-login.md
Created June 25, 2024 17:01
Logging in with Github fails for VScode

Logging in with Github fails for VS Code

Hello, if you are receiving the following message, it is likely because you are using Visual Studio Code Remote.

Try login in vscode / Login in vscode fail!

Single-Sign-On (SSO) is known to have issues for remote connections. To log into Database Client, please set a password on your account, then use your Email and Password to log in.

  1. Log into database-client.com normally.
@alancnet
alancnet / chatgpt-html-preview.js
Created June 13, 2024 17:49
TamperMonkey script to add HTML + CSS preview for when ChatGPT gives you HTML and CSS code blocks. Written by ChatGPT-4o.
// ==UserScript==
// @name ChatGPT Code Preview
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Combine and preview HTML, CSS, and JS code blocks from ChatGPT
// @author Wizulus
// @match https://chatgpt.com/*
// @grant none
// ==/UserScript==
@alancnet
alancnet / self-installing-service.sh
Created January 18, 2024 19:31
Self installing service
#!/bin/bash -e
SERVICE_NAME="self-installing-service"
SERVICE_DESCRIPTION="A self installing service bash script"
SELF_FILE=$(readlink -f $0)
SELF_DIR=$(dirname $SELF_FILE)
SELF_FILENAME=$(basename $SELF_FILE)
SERVICE_CONFIG="/etc/systemd/system/${SERVICE_NAME}.service"
SERVICE_FILENAME=$(basename $SERVICE_CONFIG)
@alancnet
alancnet / ucot.md
Created September 27, 2023 00:44
Unified Conscious Observer Theory (UCOT)

Unified Conscious Observer Theory (UCOT)

Abstract

The Unified Conscious Observer Theory (UCOT) proposes a novel framework that unifies quantum mechanics, cosmology, and the emergence of intelligent life. It posits that the universe originates from a singularity during the Big Bang, initiating a universal von Neumann-Wigner chain. This chain serves as a single, all-encompassing wavefunction that remains uncollapsed until the emergence of conscious observers, fulfilling the universe's inherent "purpose."

Key Concepts

The Big Bang

class WebError extends Error {
constructor(message, statusCode = 500, data = null) {
super(message)
this.statusCode = statusCode
}
}
class BadRequest extends WebError {
constructor(message = 'Bad Request', statusCode = 400, data = null) {
super(message, statusCode, data)
@alancnet
alancnet / Result
Created February 12, 2019 23:50
Rooms with Treasure or Monsters
Room 1
Area 1: Treasure
Area 2: Monsters
Area 3: Monsters
Area 4: Monsters
Area 5: Monsters
Area 6: Treasure
Area 7: Treasure
Area 8: Treasure
Area 9: Monsters
$fn = 1000;
translate([1,0,0]) rotate([0,-90,0]) {
translate([0,-.5/$fn,0]) cube([1,1/$fn,1]);
intersection() {
union() {
for (i = [0:2/$fn:0.5])
translate([i,0,0])
cylinder(1, i, 0);
for (i = [0:2/$fn:.5])
translate([.5 + i,0,0])
@alancnet
alancnet / table.js
Created November 12, 2018 21:59
Table WIP
const matchStart = (s1, s2) => {
const l = Math.max(s1.length, s2.length)
for (let i = 0; i < l; i++) {
if (s1[i] !== s2[i]) return i
}
return l
}
class Table {
constructor() {
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCWAJy9FWNgHvWEqof5iEk5v1c7ul0SSuOPdsZ3xJ8bX8uUY4AJCSrtj56mya8WNCn4rlbmrtdaQiv6dzzrCXYXvmnA9/AT1PCtTzqRC5gi27prG2URneObHcA0xFAU8CrmhPqU26go+fN5u2ZbS+YKCQXQwSItkmZTwMTg0xn2JXHjpDl/4AEKSc8upEjGS6IzETfUa7xiPPb0F4EHxJpJ0eQJCU2fJRHxthRS/Ex66XQyCOmC5Cc6tMlnTYybhhBH5WkkZ9x7wZ/pronmkj/2M2SYs5GPlrxLwISd51O/+o+4MEYASNblIdEJCq/+fBcZtEE4AFRy/5/pEcW3M3V alco@alco-asus
function helloWorld()
print("Hello World")
end
helloWorld()