This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ubuntu 20.04 | |
sudo apt update; sudo apt dist-upgrade; sudo apt install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev build-essential git cmake | |
mkdir src | |
cd src | |
curl -L https://github.com/raysan5/raylib/archive/refs/tags/4.5.0.tar.gz | tar xz | |
pushd raylib-4.5.0/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
import math | |
import re | |
import sys | |
ALPHABET = "".join(chr(0x100 + x) for x in range(11 * 17)) | |
PAYLOAD = """ | |
WITH RECURSIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import builtins | |
import inspect | |
import sys | |
_print = builtins.print | |
def trace_func(frame, event, arg): | |
for l in [frame.f_globals, frame.f_locals]: | |
if l.get("print") is not None and l["print"] is not _print: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Head<T extends unknown[]> = ((...args: T) => never) extends ( | |
_: infer R, | |
...args: any | |
) => never | |
? R | |
: never; | |
type Tail<T extends unknown[]> = ((...args: T) => never) extends ( | |
_: any, | |
...args: infer R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Version 1: | |
interface Document { | |
buffers: Buffer[]; | |
accessors: { [key: string]: number }; // number is an index into buffers | |
} | |
interface Buffer { | |
value: number | string | boolean; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/shader.glsl b/shader.glsl | |
index ec7854a..3825944 100644 | |
--- a/shader.glsl | |
+++ b/shader.glsl | |
@@ -140,31 +140,34 @@ void fragment() { | |
depth = exp(-depth);*/ | |
// Normalized Device Coordinates needs to be -1 to 1 in Godot | |
- vec3 ndc = vec3(SCREEN_UV, depth) * 2.0 - 1.0; | |
+ vec3 ndc = vec3(SCREEN_UV * 2.0 - 1.0, depth); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import ssl | |
import h2.connection # pip install h2 | |
HOST = "inspect-me.mc.ax" | |
def send_headers(h2conn, path, method, cookie): | |
headers = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packet_len: 16, packet_id: 0x00, id_len: 1 | |
Packet id: 0x00 | |
[242, 5, 9, 108, 111, 99, 97, 108, 104, 111]... | |
Sent by client | |
Packet of type packet_inspector::do_one_packet::{{closure}}::Handshake: | |
Handshake { | |
protocol_version: 754, | |
address: "localhost", | |
port: 33333, | |
next_state: 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# uses bash specific features | |
# Formatted with 'shfmt -i 4 -w file.sh' | |
# set -e | |
# set -u | |
set -o pipefail | |
shopt -s lastpipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fmt::{self, Display}; | |
fn main() { | |
let b = None; | |
let a = None; | |
let c = Some(5.0); | |
let ans = pyth(a, b, c).unwrap(); | |
println!("Answer: {}", ans); | |
println!("{:?}", ans); |
NewerOlder