Skip to content

Instantly share code, notes, and snippets.

@adrianhajdin
adrianhajdin / constants.js
Created March 3, 2023 09:28
Build and Deploy an Amazing 3D Web Developer Portfolio with ThreeJS | React Three Fiber
import {
mobile,
backend,
creator,
web,
javascript,
typescript,
html,
css,
reactjs,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Z-Index Example</title>
<style>
@font-face {
font-family: 'Win95F';
src: url('data:application/font-woff2;base64,d09GMk9UVE8AAB7IAAoAAAAAfLQAAB54AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADYHcRQZgAIpcATYCJAOFAAQGP21ldGGCBAWHeQcgG/17FeyYl7gdUKg+MzYSIWwchCaAJ1GUTdZM2f+fEtQxhLpXsjlMOBl1rtM5kVqBMp1XeGh4M/bhm1fyGODBICrJYyX3cIpIfVYz8+zf7k/1poo76F5SyxV35u42RuK58Pyzv//2ufiSI5FINEWNWcddrlPZZr353F4vNRtmfpL6FyCmfDO+2gEHHHZoxKaa7jrsXaZOHea+XXQOfP8/9vs9cxcVqniikQnZQ7JE62SzSFJJlfXTq1/snkEVLh3bgX9wrpvZrHU6h4r8an+wJ/mf+G0eKltj8Y0CE6MTzFphsWCV6tY3xQxWaSyijN4a1jYsZYEPgty2j1NBvFO5ztS8L7nCE3R9JjsC1hSKoT3X3uY/v7/vz137WW3kOP6K38nIPwlujGIbNkGXOwLg//99U20JOQ0Yh4DD0LlU0bhPcFDIsBzy6t0Td7+5d9mjCFAJA0VwEQ4h4M07M9/hM0P5S4sBznkkVa5S5dxVIbUt2bl0SRWdWndyVbjrtXoXfWko9Ixf8mAlKsgL1qjQb5oCz6Y4siXFEeB8+MN2upYd8LuBdoR/31iLxhoVBZhAB3bnZRRIIKn3s59aH/bm9DqFEgRElDEz/m5qk9vHmEbteKX0j35isACCAoJ0hS2/QNAEEf
@aidos-dev
aidos-dev / README.md
Last active May 1, 2024 00:15
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@zachreizner
zachreizner / main.rs
Created September 18, 2020 22:16
How to use web-sys + winit and build with wasm-bindgen.
fn main() {
let event_loop = EventLoop::new();
let window = WindowBuilder::new()
.with_resizable(false)
.with_inner_size(winit::dpi::PhysicalSize::<u32>::new(1024, 576))
.build(&event_loop)
.unwrap();
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
console_log::init().expect("could not initialize logger");
@hrldcpr
hrldcpr / tree.md
Last active May 1, 2024 00:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@ikrishagarwal
ikrishagarwal / setup-zsh-in-codespaces.md
Last active May 1, 2024 00:10
Setup starship, zsh suggestions and syntax highlight for your codespaces.
@ollieatkinson
ollieatkinson / SVG.swift
Last active May 1, 2024 00:08
Utilise the private CoreSVG framework in Swift
import Darwin
import Foundation
import UIKit
// https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS17.1.sdk/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG.tbd
// https://developer.limneos.net/index.php?ios=17.1&framework=UIKitCore.framework&header=UIImage.h
@objc
class CGSVGDocument: NSObject { }
@KTibow
KTibow / Monaco.svelte
Created November 6, 2022 20:14
Monaco editor in svelte
<script>
import { onMount } from "svelte";
import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
import cssWorker from "monaco-editor/esm/vs/language/css/css.worker?worker";
import htmlWorker from "monaco-editor/esm/vs/language/html/html.worker?worker";
import tsWorker from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
let subscriptions = [];
export let content;

These instructions are based on this blogpost by Anton Semjonov and this video by Animortis Productions. Please follow the link if you want more details, they go into much more detail about each step, whereas this document is more focused on being a concise cheat sheet. Let's go.

Install base system

Boot the Ubuntu installation medium. When asked, choose the "Try Ubuntu" option and open a terminal.

Switch to root, otherwise you'll have to type sudo all the time:

sudo su -
@drozzy
drozzy / README.md
Last active May 1, 2024 00:05
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