Skip to content

Instantly share code, notes, and snippets.

View rajsite's full-sized avatar
🐣
ʕ•ᴥ•ʔ

Milan Raj rajsite

🐣
ʕ•ᴥ•ʔ
View GitHub Profile
@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active April 29, 2024 12:39
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
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

Image stacking is a collection of related techniques used in astrophotography which all use multiple images taken by a camera to achieve a more detailed photo than would otherwise be possible. I’ve talked about image stacking in the past, but I hand-waved the statistical parts a bit. In this post, I want to dig into those mathematical details so that you understand why image stacking actually works.

But first, I’ll tell a story about thermometers. We’ll come back to image stacking after that.


Let’s imagine you’re a scientist, and you need to know the temperature of the room you’re in to within a tenth of a degree in order to run an experiment. You dutifully order a super expensive NIST-traceable thermometer online, but on the day it arrives, you open the box only to discover that you got a hundred cheap alcohol thermometers instead.

The expensive thermometer would have done the job to within a hundredth of a degree, but now it’s too late to wait for a new one to arrive, and all you have are these che

@phoddie
phoddie / io-class-pattern.md
Last active August 2, 2021 10:46
For Ecma TC53

I/O class pattern

Copyright 2018 Moddable Tech, Inc.
Peter Hoddie
Patrick Soquet
Updated December 17, 2018

Overview

The I/O class pattern is designed to be applied to many different interfaces. These include digital, analog input, SPI, I2C, serial, TCP socket, UDP socket, etc. Each of these defines a class pattern for the interface (e.g. a Digital class pattern) that is a logical subclass of the I/O class pattern.

The I/O class pattern assumes read and write operations will not block for significant periods of time (this is deliberately not quantified). The model for this is non-blocking network sockets.

@peterhellberg
peterhellberg / ffserver.conf
Last active December 2, 2022 06:30
MJPEG stream from Webcam using FFServer and FFMpeg
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 200
MaxClients 100
MaxBandWidth 500000
CustomLog -
<Feed camera.ffm>
File /tmp/camera.ffm
FileMaxSize 200M
@notwaldorf
notwaldorf / 👀.md
Last active February 18, 2024 21:13
Advice for new developers

Someone sent me an email asking me what advice I had for new developers. I get this question a bunch, so I wanted to put all my thoughts in one place, that I can update as I get more ideas!

I answered this a bunch on my AMA repo, so here's some initial general answers, before I get to some of the specific questions:

@floooh
floooh / NetClient.cc
Created January 18, 2017 16:07
NetClient.h (emscripten/osx/win)
//------------------------------------------------------------------------------
// NetClient.cc
//------------------------------------------------------------------------------
#if ORYOL_WINDOWS
#define _WINSOCK_DEPRECATED_NO_WARNINGS (1)
#include <WinSock2.h>
typedef int ssize_t;
#endif
#if ORYOL_POSIX
@kripken
kripken / hello_world.c
Last active January 17, 2024 12:15
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@avafloww
avafloww / PhpJava.java
Last active October 16, 2022 18:50
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
/*<?php
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
//\u000A\u002F\u002A
class PhpJava {
static function main() {
echo(//\u000A\u002A\u002F
"Hello World!");
}}
//\u000A\u002F\u002A
PhpJava::main();
@mathiasbynens
mathiasbynens / web-platform-status-links.md
Last active April 16, 2024 02:54
Web platform status links
@paulirish
paulirish / what-forces-layout.md
Last active April 29, 2024 16:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent