Skip to content

Instantly share code, notes, and snippets.

View FunctionDJ's full-sized avatar

FunctionDJ

View GitHub Profile
@FunctionDJ
FunctionDJ / Bookmark Code.js
Last active October 5, 2021 15:01
YouTube 3/2 Aspect Ratio Toggler (No dependencies)
(() => {
let existing = document.querySelector("#ar")
if (existing) {
existing.remove()
} else {
let styleNode = document.createElement("style")
styleNode.id = "ar"
styleNode.type = "text/css"
styleNode.appendChild(document.createTextNode("video{transform:scaleX(calc((3/2) / (16/9)))}"))
document.head.appendChild(styleNode)
@FunctionDJ
FunctionDJ / shortcuts.md
Last active September 14, 2021 10:19
Google Spreadsheet Shortcuts on QWERTZ / German Keyboard
Name Shortcut
Toggle show formulas Ctrl + ö
Show keyboard shortcuts (somewhat useless on a different layout) Ctrl + #
Insert current date Ctrl + ü
Insert current time Ctrl + Shift + ü
Insert current date and time Ctrl + Alt + Shift + ü
Insert rows/columns or Open insert menu Ctrl + Alt + +
@FunctionDJ
FunctionDJ / Example.php
Created September 9, 2021 14:53
phpstan/larastan issue
<?php
namespace Database\Seeders;
use App\Models\ItemProfile;
class Foo
{
public function run(): void
{
@FunctionDJ
FunctionDJ / tasks.json
Created September 9, 2021 12:11
PHPStan problem matcher for VSCode tasks.json
{
"owner": "phpstan",
"source": "phpstan",
"severity": "error",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": [
{
"regexp": "^\\s*Line\\s*(.*)$",
"file": 1,
},
/**
* Types for character / expression rendering by https://github.com/FunctionDJ
*
* Credit goes to https://github.com/ac2pic and https://github.com/AndrielChaoti
* for initial types at https://github.com/CCDirectLink/crosscode-re-docs/blob/master/gui/faces.md
*/
type Mapped<T> = {
[key: string]: T
}
/**
* Types for character / expression rendering by https://github.com/FunctionDJ
*
* Credit goes to https://github.com/ac2pic and https://github.com/AndrielChaoti
* for initial types at https://github.com/CCDirectLink/crosscode-re-docs/blob/master/gui/faces.md
*/
type Mapped<T> = {
[key: string]: T
}
type Mapped<T> = {
[key: string]: T
}
export interface CharacterData {
face?: Face | string | FaceMap
}
export interface Face {
width: number
import { ReactElement } from "react";
import { Alert } from "react-bootstrap";
import { ChangeVarNumber_T } from "../../interfaces/actions";
interface Props {
data: ChangeVarNumber_T
}
export const ChangeVarNumber = ({ data }: Props) => {
const value = (
type GameAction =
"moveDirX"
| "aiming"
| "charge"
| "menuBack"
| "menuHotkeyHelp2"
| "questCircleLeft"
| "dashing"
| "guarding"
type GameAction =
"moveDirX"
| "aiming"
| "charge"
| "menuBack"
| "menuHotkeyHelp2"
| "questCircleLeft"
| "dashing"
| "guarding"