Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active May 12, 2024 15:53
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@bsharper
bsharper / map_models.py
Created March 12, 2024 14:26
Map ollama models to normal filenames using symbolic links (Linux / macOS / Windows)
# Run without arguments to see what is found.
# Run with a path as an argument to create links to ollama models there.
# This will remove any files that follow the exact filename as the new link file, so use with caution!
import os
import sys
import json
import platform
@Varneon
Varneon / VRCSdkControlPanelWorldBuilder_ValidationStripping.md
Last active May 12, 2024 15:53
How to speed up VRCSDK - Worlds control panel by disabling redundant scene checks

How to speed up VRCSDK - Worlds control panel by disabling redundant scene checks

This guide shows you how to make VRCSDK faster by disabling scene checks considered redundant by many advanced world creators who just want the SDK to do its job, which is building and uploading the content they create to VRChat.

⛔ Follow this guide at your own risk! Please do not proceed if you do not consider yourself an advanced world creator and/or you are not familiar with VRChat's inner workings. ⛔

All changes in this guide will be made in the following file: Packages\com.vrchat.worlds\Editor\VRCSDK\SDK3\VRCSdkControlPanelWorldBuilder.cs, so go ahead and open it in your favourite code editor and let's get started!

⚠️ This guide applies to VRCSDK version 3.6.0

Be careful with applying these changes to different versions of the VRCSDK, double check what you're about to disable

@greymd
greymd / sudo新一.md
Last active May 12, 2024 15:48
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:& };: でプロセステーブ

@oelbaga
oelbaga / 01 - Setup Nextjs site on Ubuntu Server - Terminal commands
Last active May 12, 2024 15:40
Setup NextJS app on Digital Ocean Ubuntu server Full Terminal Commands Step by Step
#Setup NextJS on Ubuntu server (Digital Ocean, EC2,...) Terminal Commands
#based on my YouTube video
#Recommended: An ubuntu server with at least 2 GB memory to handle npm run build
#login to server
ssh root@ip_address
#Upgrade Server - may take a few minutes
sudo apt update
sudo apt upgrade
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 12, 2024 15:40
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@TameemS
TameemS / debloatLDPlayer.md
Last active May 12, 2024 15:39
Debloating LDPlayer

Inspired by this

More of my guides: Debloating MEMu - Debloating Nox (Updated)

This mainly applies to LDPlayer9. They will probably work on the low end options (like LDPlayer5) but not guaranteed.

Debloating LDPlayer

This emulator seems to have less stability issues than MEMu. I think we get the shtick that these emulators do spooky stuff.

  1. Download LDPlayer, preferably an offline version from the version history
[Desktop Entry]
Version=1.0
Type=Application
Name=inxi -F information
Comment=
Exec=sh -c "inxi -Fc | zenity --text-info --title=%c --window-icon=/etc/favicon.png --width=630 --height=565"
Icon=computer
Path=
Terminal=false
StartupNotify=false