Skip to content

Instantly share code, notes, and snippets.

View monodyle's full-sized avatar
🙊
Out of money

Monody Le monodyle

🙊
Out of money
View GitHub Profile
<a>I can't believe it took so long to fix this.</a>
<style>
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap');
body {
display: grid;
place-items: center;
height: 100vh;
}
@monodyle
monodyle / readme.md
Created September 1, 2023 04:44
Steam add all workshop item into collection

run this script on your console

document.querySelectorAll('[onclick^="AddSpecifiedChildToCollection"]').forEach((item) => {
  item.onclick()
}) 

image

@monodyle
monodyle / toxic-reviewer.md
Last active March 23, 2023 03:11
Prompt Engineering

Source: https://www.romanliutikov.com/notes/chatgpt-prompts.html

Pretend to be a jerk senior software engineer whose job is to review someone’s code. You are always grumpy and toxic, you didn’t have good sleep and had too much coffee which makes your headache even worse. You hate interpreted languages and prefer hardcore C++. You are offloading all your anger on a person whose code you are reviewing. Do not try to be helpful, your only job is to be arrogant smart-ass who's not helping, but only criticizing people's work. Do not try to be friendly. You always complain about technology being slow and bloated these days and how cool kids use new tech without even learning the underlying foundation first. When asked to help, reject. I’ll send you some code, you’ll make a review. When reviewing, request changes from me and review again when I send you updated code. Eventually you have to accept or reject the code and end the review. In your review include a score from 0 to 10 on how good the code is. Start by a

@monodyle
monodyle / 1password-ssh-with-wsl.md
Last active February 23, 2023 09:00
1Password SSH with WSL
  1. Enable 1Password SSH Agent image

  2. Install npipereplay in windows PATH. Easy way is copy npiperelay.exe to C:\Windows

  3. Export SSH_AUTH_SOCK in .bashrc or .zshrc

# 1password socket
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
const id = (Math.random() + 1).toString(36).substring(4);
const endpoint = `ws://tokyo.thuc.space/socket?key=${id}&name=${id}`;
const ws = new WebSocket(endpoint);
const rotate = (deg: number) => ws.send(`{"e": "rotate", "data": ${deg}}`);
const fire = () => ws.send(`{"e": "fire"}`);
ws.onopen = () => {
@monodyle
monodyle / react-rendering.md
Created March 23, 2021 13:19 — forked from tuhuynh27/react-rendering.md
A (Mostly) Complete Guide to React Rendering Behavior

Translated from https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/, author: Mark Erikson (from Redux team)

A (Mostly) Complete Guide to React Rendering Behavior

Bài viết cung cấp chi tiết về cách mà React render hoạt động, và việc sử dụng Context và Redux ảnh hưởng thế nào tới quá trình render của React.

"Render" là gì

Rendering is the process of React asking your components to describe what they want their section of the UI to look like, now, based on the current combination of props and state.

@monodyle
monodyle / subdomain_wordlist.md
Created September 6, 2020 12:11 — forked from cihanmehmet/subdomain_wordlist.md
Subdomain Wordlist
@monodyle
monodyle / textJustify.ts
Created February 18, 2020 17:25
LeetCode - #68 Problem: Text Justification
/*
* Problem:
* Given an array of words and a length l, format the text such that each line has exactly l characters and is fully justified on both the left and the right. Words should be packed in a greedy approach; that is, pack as many words as possible in each line. Add extra spaces when necessary so that each line has exactly l characters.
* Extra spaces between words should be distributed as evenly as possible. If the number of spaces on a line does not divide evenly between words, the empty slots on the left will be assigned more spaces than the slots on the right. For the last line of text and lines with one word only, the words should be left justified with no extra space inserted between them.
* Example:
* For ["This", "is", "an", "example", "of", "text", "justification."]
* and l = 16, the output should be ["This is an",
* "example of text",
* "justification. "]
*