Skip to content

Instantly share code, notes, and snippets.

View Traxmaxx's full-sized avatar
🦄

Alexander Rösel Traxmaxx

🦄
View GitHub Profile
@hyperupcall
hyperupcall / settings.jsonc
Last active June 26, 2024 18:59
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@akihikodaki
akihikodaki / README.en.md
Last active June 27, 2024 11:50
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@TRPB
TRPB / arch-macbook2018.md
Last active June 14, 2024 17:31
Guide: Running Arch on a 2018 MacBook Pro

Hardware Prerequisites

You'll need at least the following hardware:

  • At least 3 USB-A to USB-C converters or hub with enough ports for at least 3 USB devices if all your devices are USB-A then:
  • A USB drive
  • A USB keyboard
  • USB to Ethernet adapter, compatible USB dongle or USB tethering on a phone
@munificent
munificent / generate.c
Last active May 14, 2024 05:30
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@hafbau
hafbau / example_vertical_tabs_react_material_ui.js
Last active December 11, 2022 18:14
Vertical Tabs Example - React Material UI
import React from 'react';
import Tabs from '@material-ui/core/Tabs'
import Tab from '@material-ui/core/Tab'
import Typography from '@material-ui/core/Typography'
import { withStyles } from '@material-ui/core/withStyles';
class ProfileTabs extends React.PureComponent {
state = { activeIndex: 0 }
@Mabahe
Mabahe / redirects_realurl2core.sql
Created March 15, 2018 14:08
Migrate realurl redirects to sys_redirect (TYPO3 9 core)
INSERT INTO `sys_redirect` (source_path,target,hitcount,target_statuscode,source_host) SELECT CONCAT('/',url),destination,counter,301,d.domainName FROM `tx_realurl_redirects` r LEFT JOIN sys_domain d ON r.domain_limit = d.uid;
UPDATE sys_redirect SET source_host = '*' WHERE source_host = '';
@avafloww
avafloww / PhpJava.java
Last active June 13, 2024 07:36
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();
@StevenLangbroek
StevenLangbroek / 00_readme.md
Last active February 9, 2017 22:14
Validation for Redux-form

"Thunked" validation in redux-form

Validation in redux-form can be approached using many "schema-validation" libraries. I used validate.js, but ran into a restriction: we needed to validate user input differently based on other input in that same form. This is quite a common requirement for validation, and was surprisingly elegant to solve in redux-form.

small caveat: not adapted for redux-form 6

Libraries used:

@alirobe
alirobe / reclaimWindows10.ps1
Last active June 26, 2024 17:02
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@paulirish
paulirish / what-forces-layout.md
Last active June 26, 2024 20:47
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