Skip to content

Instantly share code, notes, and snippets.

View LukasDoesDev's full-sized avatar
🖥️
I write code and sometimes it even works

LukasDoesDev LukasDoesDev

🖥️
I write code and sometimes it even works
View GitHub Profile
@joelonsql
joelonsql / JOIN FOREIGN.md
Last active February 8, 2023 23:29
SQL language proposal: JOIN FOREIGN

SQL language proposal: JOIN FOREIGN

The idea is to improve the SQL language, specifically the join syntax, for the special but common case when joining on foreign key columns.

The problem

Example below taken from PostgreSQL documentation [1]

In SQL-89, we didn't have any JOIN syntax yet, so queries were written in this way:

@akshaykhadse
akshaykhadse / README.md
Last active April 23, 2024 06:36
C++ Google Colab Plugin

C++ Google Colab Plugin

Example notebook can be found here.

@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active February 19, 2024 09:42
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@LnLcFlx
LnLcFlx / archlogo.txt
Last active March 7, 2024 20:08
Arch Linux logo using unicode block characters
\033[38;2;23;147;209m ▄
▟█▙
▟███▙
▟█████▙
▟███████▙
▂▔▀▜██████▙
▟██▅▂▝▜█████▙
▟█████████████▙
▟███████████████▙
▟█████████████████▙
@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@mattlockyer
mattlockyer / conditional-json.js
Created June 19, 2019 15:25
Using spread syntax to conditionally add JSON key, value to object. Fetch example using POST and Authorization.
export const POST = (auth) => ({
method: "POST", // *GET, POST, PUT, DELETE, etc.
mode: "cors", // no-cors, cors, *same-origin
headers: {
"Content-Type": "application/json",
...(auth ? { "Authorization": auth } : {})
},
})
@MPThLee
MPThLee / enableDiscordExperiments.js
Last active March 26, 2024 23:58
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@Rich-Harris
Rich-Harris / README.md
Last active September 24, 2023 20:08
first-class binding syntax

A modest proposal for a first-class destiny operator equivalent in Svelte components that's also valid JS.

Svelte 2 has a concept of computed properties, which are updated whenever their inputs change. They're powerful, if a little boilerplatey, but there's currently no place for them in Svelte 3.

This means that we have to use functions. Instead of this...

<!-- Svelte 2 -->
<h1>HELLO {NAME}!</h1>
@fnky
fnky / ANSI.md
Last active April 24, 2024 03:46
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@YumaInaura
YumaInaura / VIM.md
Last active April 16, 2024 22:17
Vim — What is the name of "q and colon" mode? ( A. command-line window )

Vim — What is the name of "q and colon" mode? ( A. command line window )

Or named "command window".

I mean "q and colon" ( q: ).

Not "colon and q" means quit vim ( :q ).

image