Skip to content

Instantly share code, notes, and snippets.

View machinaeXphilip's full-sized avatar
🦕

machinaeXphilip machinaeXphilip

🦕
  • Berlin, Germany
View GitHub Profile
@machinaeXphilip
machinaeXphilip / SceneViewZAlign.cs
Created July 25, 2023 16:44 — forked from FreyaHolmer/SceneViewZAlign.cs
Allows the scene view camera to use Z up/down (be sure to place this script in an Editor/ folder)
// Allows you to change the up vector in the scene view to the Z axis.
// Y-up mode uses Unity's default implementation.
//
// Original code from Akulist on the Unity forums, modified by Freya Holmér:
// • Fixed orbit+RMB zoom not working
// • Toggling will now align the camera immediately to the new up vector
// • When the camera is upside down in Z axis mode, left/right orbit will no longer be mirrored (pls fix this too Unity~)
// • Moved toggle buttons to under the gizmo
// • Fixed broken rotation state when focusing a different window in Unity and coming back to the scene view
//
@machinaeXphilip
machinaeXphilip / index.html
Last active January 10, 2023 07:59
electron-browser-window-size-limitation-2nd-screen
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@machinaeXphilip
machinaeXphilip / distanceBetween2points.sql
Created December 31, 2020 15:01
SQL Postgres PostGIS GET Distance between 2 points geography
SELECT ST_Distance(gg1, gg2) AS distance
FROM (
SELECT (SELECT geo from geograph WHERE label = 'home') as gg1,
(SELECT geo from geograph WHERE label = 'work') as gg2
) AS foo;
// Convert complex js object to dot notation js object
// url: https://github.com/vardars/dotize
// author: vardars license: MIT
// modified by machinaexphilip in order to exclude Arrays from being dotized.
var dotize = {
valTypes: {
none: "NONE",
primitive: "PRIM",