Skip to content

Instantly share code, notes, and snippets.

View lateshift's full-sized avatar
📡
ヘ( ̄ー ̄ヘ)

Jens C. lateshift

📡
ヘ( ̄ー ̄ヘ)
View GitHub Profile
@lateshift
lateshift / gen.scss
Last active March 9, 2020 11:47
Generate grid-template-area definitions via SCSS
@use "sass:list";
@use "sass:string";
// Quick hack (tm) e.g. not cleaned-up/optimized but since it runs on compile time - who cares ;)
@function genAreas($prefix, $rows, $columns) {
$list: ();
$line: ();
$result: '';
@for $row from 1 through $rows {
$result: '';
@lateshift
lateshift / XCode.md
Last active October 20, 2021 08:45
Duplicate Lines in XCode-PROPER

Add (proper) Line(s) duplication to XCode

Add to /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/IDETextKeyBindingSet.plist

<key>Duplication</key>
<dict>
    <key>Duplicate Current Lines Down</key>
    <string>selectParagraph:, delete:, yank:, moveToBeginningOfParagraph:, yank:, moveUp:, moveToEndOfParagraph:</string>
 Delete Current Line
@lateshift
lateshift / table.js
Created September 15, 2022 09:20
Generate a table
var doc = new pdf.Document({
font: fonts.Helvetica,
properties: {
title: "Tabelle",
author: "Jens C",
subject: "Tabelle",
producer: "Tabelle",
creator: "Jens C."
}
});
@lateshift
lateshift / commonprofile.metal
Created July 24, 2023 11:36 — forked from j-j-m/commonprofile.metal
Can't access GL Uniforms in Metal shader modifier? Apple docs for SCNShadable written in terms of GL? Pulling your hair out?... this will help.
////////////////////////////////////////////////
// CommonProfile Shader v2
#import <metal_stdlib>
using namespace metal;
#ifndef __SCNMetalDefines__
#define __SCNMetalDefines__
@lateshift
lateshift / gist:061423fa466ede40e058aee488611dee
Last active August 4, 2023 12:05
Basic VSCode keys in Sublime Text
[
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } },
{ "keys": ["shift+alt+down"], "command": "duplicate_line" },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
]
@lateshift
lateshift / dbstuff.py
Created February 1, 2024 15:46
Postgres Comments in Django Model help_text (not just the "db_comment"; necessary for django graphene)
from django.core.management.commands import inspectdb
from django.core.management.base import BaseCommand, CommandError
import keyword
import re
from django.core.management.base import BaseCommand, CommandError
from django.db import DEFAULT_DB_ALIAS, connections
from django.db.models.constants import LOOKUP_SEP