Skip to content

Instantly share code, notes, and snippets.

View KargJonas's full-sized avatar
👨‍🔬
Still testing ...

Jonas Karg KargJonas

👨‍🔬
Still testing ...
View GitHub Profile
@drcircuit
drcircuit / matrisprojection.js
Created February 27, 2019 09:24
Some Matrix functions for 3d projection
function matrix(m){
return m || [
[1,0,0,0],
[0,1,0,0],
[0,0,1,0],
[0,0,0,1],
];
}
function projectionmatrix(fov,aspect,znear,zfar){

The problem

When a MobileSafari keyboard-receing input (e.g. an input[type=text]) receives focus in Safari, the system will try to verify whether there is ample room to bring up the soft keyboard without needing to scroll. The amount of wiggle room needed for Safari to consider available scroll height "ample" seems to increase with every major iOS release (surely to work around the very real problem of focus being granted to inputs that are subsequently oscured by the keyboard).

However, for "app-ey" web sites that carefully place each text input in a relatively fixed layout, this can be a maddening arms of scooching up my content more and more with each iOS release to avoid awkward jutters every time the keyboard is shown (example video here. In practice, it seems like the input's scrollHeight can only really be about the equivalent of 15vh before you're likely to get an automated scrolling whiplash from the soft keyboard, which isn't much

@bradtraversy
bradtraversy / webdev_online_resources.md
Last active November 19, 2025 14:28
Online Resources For Web Developers (No Downloading)
void setup() {
Serial.begin(115200);
Serial1.begin(115200);
}
void loop() {
byte b;
if (Serial1.available() > 0) {
b = Serial1.read();
Serial.write(b);
@xxlukas42
xxlukas42 / esp32_internal_hall.ino
Last active December 17, 2024 17:43
Arduino source code for ESP32 internal temperature sensor and hall sensor
void setup() {
Serial.begin(115200);
}
void loop() {
int measurement = 0;
measurement = hallRead();
@Wunkolo
Wunkolo / compact.cpp
Last active May 5, 2024 20:21
Ascii Raymarcher(old)
#include <math.h>
#include <algorithm>
#include <string>
#include <immintrin.h>
using namespace std;typedef float R;
#define _W 79
#define _H 39
#define EP 0.01f
#define OP operator
#define C const
@anvaka
anvaka / 00.Intro.md
Last active January 16, 2026 09:48
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@lancejpollard
lancejpollard / meta-tags.md
Created March 5, 2012 13:54
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@max-mapper
max-mapper / sick-neon-colors.js
Created February 26, 2011 02:45
sick neon colors
var sick_neon_colors = ["#CB3301", "#FF0066", "#FF6666", "#FEFF99", "#FFFF67", "#CCFF66", "#99FE00", "#EC8EED", "#FF99CB", "#FE349A", "#CC99FE", "#6599FF", "#03CDFF", "#FFFFFF"];
function randomColor(colors) {
return colors[Math.floor(Math.random()*colors.length)];
};