Skip to content

Instantly share code, notes, and snippets.

View moritzsalla's full-sized avatar

Moritz Salla moritzsalla

View GitHub Profile
@cmgiven
cmgiven / .block
Last active March 17, 2024 03:17
Rectangular Collision Detection
license: mit
@gunderson
gunderson / FlyCamera.cs
Last active June 27, 2024 15:18
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@zoxon
zoxon / html-time-datetime-cheatsheet.md
Created April 14, 2019 10:55
HTML <time> datetime Attribute cheatsheet

Dates:

<time datetime="1914">  <!-- means the year 1914 -->
<time datetime="1914-12">  <!-- means December 1914 -->
<time datetime="1914-12-20">  <!-- means 20 December 1914 -->
<time datetime="12-20">  <!-- means 20 December any year -->
<time datetime="1914-W15">  <!-- means week 15 of year 1914 -->

Date and Times:

@stettix
stettix / things-i-believe.md
Last active July 10, 2024 23:00
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@csandman
csandman / debounce-swr.js
Last active November 17, 2023 09:12
Debounce useSwr
// originally from: https://github.com/vercel/swr/issues/110#issuecomment-552637429
import useSWR from 'swr';
import useDebounce from 'hooks/use-debounce';
const App = () => {
const [search, setSearch] = useState('');
const debouncedSearch = useDebounce(search, 1000);
const { data: res, isValidating } = useSWR(
() => debouncedSearch ? `/api/suggestion?value=${debouncedSearch}` : null,
Api.fetcher,