Skip to content

Instantly share code, notes, and snippets.

View Innei's full-sized avatar
πŸ’­
Coding with cloud.

Innei Innei

πŸ’­
Coding with cloud.
View GitHub Profile
@Innei
Innei / patch.diff
Created December 23, 2024 06:13
patch next@v14 ssr render issue
diff --git a/dist/build/webpack/loaders/next-flight-loader/index.js b/dist/build/webpack/loaders/next-flight-loader/index.js
index 34d196104da9e95a5d6d6202cc4739b10b3922e3..1c2d9faa02c8de84d0a18fa800ac6c6a1f69c174 100644
--- a/dist/build/webpack/loaders/next-flight-loader/index.js
+++ b/dist/build/webpack/loaders/next-flight-loader/index.js
@@ -57,6 +57,8 @@ function transformSource(source, sourceMap) {
if (typeof source !== "string") {
throw new Error("Expected source to have been transformed to a string.");
}
+ const options = this.getOptions()
+ const { isEdgeServer } = options
@Innei
Innei / overtime_commits.ts
Last active September 22, 2024 11:40
Calculation of overtime and vacation hours
import { execSync } from "node:child_process"
import fs from "node:fs"
import dayjs, { Dayjs } from "dayjs"
import customParseFormat from "dayjs/plugin/customParseFormat.js"
import isSameOrAfter from "dayjs/plugin/isSameOrAfter.js"
import isSameOrBefore from "dayjs/plugin/isSameOrBefore.js"
import weekday from "dayjs/plugin/weekday.js"
dayjs.extend(customParseFormat)
@Innei
Innei / init.lua
Created July 24, 2023 14:31
map-hjkl
local function pressFn(mods, key)
if key == nil then
key = mods
mods = {}
end
return function() hs.eventtap.keyStroke(mods, key, 1000) end
end
local function remap(mods, key, pressFn)
@Innei
Innei / colors.ts
Created June 10, 2023 05:38
UIKit Colors and materials
const UIKitColors = {
red: {
light: '#FF3B30',
dark: '#FF453A',
},
orange: {
light: '#FF9500',
dark: '#FF9F0A',
},
@Innei
Innei / xlog.css
Created April 29, 2023 01:58
xlog.css
@import url("https://cdnjs.cloudflare.com/ajax/libs/lxgw-wenkai-screen-webfont/1.7.0/lxgwwenkaiscreenr.css");
.xlog-page-index, .xlog-page-post {
font-family: "LXGW WenKai Screen R", sans-serif;
}
@font-face {
font-family: SFCompactRounded;
font-weight: 300;
src: url(https://ipfs.4everland.xyz/ipfs/bafybeidme3gx5cgofwznbtccc7vnfi2acecdzaiy7yfcjyq4e3qgzqwzem);
@Innei
Innei / box
Last active July 27, 2023 23:02
PS Box
Ghost of Tsushima 25 hrs 2 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 40%
Ratchet & Clan... 22 hrs 29 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%
DEATH STRANDINGβ„’ 18 hrs 41 mins β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–β–‘β–‘β–‘ 71%
SCARLET NEXUS 17 hrs 27 mins β–ˆβ–ˆβ–ˆβ–ˆβ–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 37%
UNCHARTED: Leg... 16 hrs 42 mins β–ˆβ–Šβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 14%
@Innei
Innei / vscode.json
Last active June 21, 2024 10:04
vscode
{
"editor.fontSize": 14,
"editor.fontFamily": "\"OperatorMonoSSmLig Nerd Font\",\"Cascadia Code PL\",\"FantasqueSansMono Nerd Font\",\"operator mono\",\"Fira code Retina\",\"Fira code\",\"Consolas\", Monaco, \"Hannotate SC\",-apple-system",
"editor.formatOnType": true,
"editor.fontWeight": "bold",
"workbench.iconTheme": "material-icon-theme",
"files.autoGuessEncoding": false,
"editor.parameterHints.enabled": true,
"typescript.tsserver.maxTsServerMemory": 1024,
"window.nativeTabs": true,
@Innei
Innei / confim-github-dialog.js
Created June 12, 2022 02:44
Confim github need enter repo name dialog
javascript: void (document.querySelector("#options_bucket%20%3E%20div.Box.color-border-danger%20%3E%20ul%20%3E%20li:nth-child(3)%20%3E%20details%20%3E%20details-dialog%20%3E%20div.Box-footer%20%3E%20form%20%3E%20p%20%3E%20input%22).value%20=%20document.querySelector('#options_bucket%20%3E%20div.Box.color-border-danger%20%3E%20ul%20%3E%20li:nth-child(3)%20%3E%20details%20%3E%20details-dialog%20%3E%20div.Box-footer%20%3E%20p%20%3E%20strong').textContent);void%20(document.querySelector(%22#options_bucket%20%3E%20div.Box.color-border-danger%20%3E%20ul%20%3E%20li:nth-child(3)%20%3E%20details%20%3E%20details-dialog%20%3E%20div.Box-footer%20%3E%20form%20%3E%20button%22).disabled%20=%20false);void%20(document.querySelector(%22#options_bucket%20%3E%20div.Box.color-border-danger%20%3E%20ul%20%3E%20li:nth-child(4)%20%3E%20details%20%3E%20details-dialog%20%3E%20div.Box-body.overflow-auto%20%3E%20form%20%3E%20button%22).disabled%20=%20false);%20void%20(document.querySelector(%22#options_bucket%20%3E%20div.Box.color-border
@Innei
Innei / rn-tagtext.tsx
Created April 29, 2022 07:11
rn-tagtext.tsx
<View>
<View
style={{
flexWrap: 'wrap',
width: 500,
flexDirection: 'row',
backgroundColor: 'pink',
}}
>
<View style={{ width: 50, height: 20, backgroundColor: 'red' }}>
@Innei
Innei / copy.ts
Last active April 18, 2022 09:18
rn-style-to-css
// @ts-check
import { FontSize, FontWeight, Color, LineHeight } from './styles';
const camelToSnakeCase = (str) =>
str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
const StyleSheet = {
create(a) {
return a;
},
};