Skip to content

Instantly share code, notes, and snippets.

"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------

Half-Life 2 on the Switch

This is a guide for running Half-Life 2 on your Switch. Please be aware that this isn't a great way of playing Half-Life 2 - do not expect this mod to work perfectly.

Thank you to Bringus Studios for fixing save files not showing up!

NOTE: I am assuming that you have basic knowledge about how modding games on the Switch works. I will not provide support for questions like "how do I install Atmosphère / CFW", "how do I make an emuMMC", "how do I extract games", etc. For help with modding your console, see the NH Switch Guide.

WARNING: While this mod should be fairly safe to use, I do not take any responsibility if your Portal save data is deleted, you get banned from Nintendo Switch Online, or if your Switch explodes.

@taskylizard
taskylizard / fmhy.md
Last active April 16, 2024 17:48
/r/freemediaheckyeah, in one single file (view raw)
@mansarip
mansarip / info.md
Last active April 16, 2024 17:48
How to use PDFKit with Hono + Bun

How to use PDFKit with Hono + Bun

Full example

import { Hono } from "hono";
import PDFDocument from "pdfkit";

const app = new Hono();
@guilhermebruzzi
guilhermebruzzi / remove-immutable.md
Last active April 16, 2024 17:46
Remove Immutable JS from your source code

I decided to remove all Immutable code on our big project because it wasn't causing our React to render less (using selectors on our redux layer was actually better).

Since our project has tests to check if everything is still working, I was able to achieve that with the following steps:

Search on all files on vscode or any editor with Use Regular Expression option (command+alt+r on vscode):

(Immutable|\.(size|count\(|toJS(?!\w)|fromJS(?!\w)|first[\(\)]|get\(|set\(|findEntry\(|getIn\(|setIn\(|contains\(|delete\(|asImmutable|add\())

Then on each find that was actually from a Immutable code:

  • Remove Immutable imports
import SwiftUI
struct SkeletonView<Content: View>: View {
let content: () -> Content
var body: some View {
content()
.hidden()
.overlay(gradient)
}
@YashkShrivas4491
YashkShrivas4491 / typescript.ts
Last active April 16, 2024 17:44
TypeScript CheatSheet 🎉
// TypeScript is a superset of JavaScript that adds static types.
// Declare a variable 'age' that can be either a number or a string.
let age: number | string = "65";
console.log(age);
// Declare a boolean variable 'isChecked'.
let isChecked: boolean = true;
console.log(isChecked);
@ThomasG77
ThomasG77 / README.md
Last active April 16, 2024 17:43
Recipe to get JSON using pagination using command line tools e.g curl, jq, bc, cat
@RitRa
RitRa / exercise.md
Last active April 16, 2024 17:42 — forked from theRemix/exercise.md
MongoDB Practice

MongoDB Practice

MongoDB Exercise in mongo shell

create database

Connect to a running mongo instance, use a database named mongo_practice. use mongo_practice

Insert Documents