Skip to content

Instantly share code, notes, and snippets.

@rcowsill
rcowsill / Server.py
Last active January 30, 2024 21:46 — forked from HaiyangXu/Server.py
Minimal python http server (works on Windows)
import http.server
import socketserver
HOST = "localhost"
PORT = 8080
class HttpRequestHandler(http.server.SimpleHTTPRequestHandler):
extensions_map = {
".js":"text/javascript",
}
@rcowsill
rcowsill / jsk.c
Created January 28, 2024 11:32 — forked from kdzwinel/jsk.c
JSK -JPEG Scan Killer
/*
* jsk.c
*
* Copyright (C) 2013, Frederic Kayser.
*
*/
#include <stdio.h>
#include <stddef.h>
@rcowsill
rcowsill / delay_cycles_runtime.asm
Last active January 12, 2022 13:38
MSP430 variable delay routine
; MSP430 variable delay routine
; void delay_cycles_runtime(unsigned short cycles);
;
; Works like __delay_cycles, but the delay needn't be a compile-time constant
; Requires zero wait state instruction fetch; run from RAM as necessary
; Delay is clamped to 18 cycles minimum. Total size is 28 bytes
.text
.def delay_cycles_runtime
@rcowsill
rcowsill / LICENSE
Created August 6, 2020 00:13 — forked from kirbysayshi/LICENSE
Hierarchical Spatial Hash Grid: extremely efficient spatial hashing for collision detection between objects of any size! This is an implementation in JS as described in http://www10.informatik.uni-erlangen.de/~schornbaum/hierarchical_hash_grids.pdf
Copyright 2012 Andrew Petersen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR O