Skip to content

Instantly share code, notes, and snippets.

View scadl's full-sized avatar
🏠
Working from home

Alexandr scadl

🏠
Working from home
View GitHub Profile
@nisovin
nisovin / Godot Web Server Configs.md
Last active July 9, 2024 07:45
Godot Web Server Configs

Godot Web Server Configs

For Godot 4 and the threads export in Godot 3, you need to set special headers on your web server in order to enable SharedArrayBuffer. There are some examples here for various web servers.

Python

The script below can be used to start a web server that sets the required headers. The easiest way to use this is to place this python script in your export folder and double click it to start the server. Then you can view your game at http://localhost:8000.

@koistya
koistya / App.js
Last active June 8, 2022 09:55
How to add `onscroll` event in ReactJS component
import React from 'react';
let lastScrollY = 0;
let ticking = false;
class App extends React.Component {
componentDidMount() {
window.addEventListener('scroll', this.handleScroll, true);
}
@cofearabi
cofearabi / AndroidManifest.xml
Last active July 21, 2020 12:50
Android sample connect to the mysql server database and get the values of field of table , and display them.
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />