Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 00:42
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

@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 5, 2024 00:37
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@4e4c52
4e4c52 / fish_install.md
Last active May 5, 2024 00:37 — forked from gagarine/fish_install.md
Install fish shell on macOS with Apple Silicon and brew

Installing Fish shell on MacOS

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can nstall it on MacOS and make your defaul shell.

Note that you need the https://brew.sh/ package manager.

You can also download the fish app from their website. I do recomand using brew because update are easier.

Install Fish

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2D Platformer Game</title>
<style>
canvas {
border: 1px solid black;
display: block;
@carlospolop
carlospolop / machoreader.py
Created July 6, 2023 16:10
Print information about a macho binary using python
import plistlib
import struct
import logging
import lief
import sys
from typing import List
from macholib import MachO, mach_o
logger = logging.getLogger(__name__)

Playbook: Creating a GitHub Integration Plugin for Backstage

Overview

This playbook outlines the steps to create a plugin for Backstage that integrates with GitHub to do user specified tasks.

What's Needed From User

  • GitHub repository URL.
  • Access token with appropriate permissions for accessing the repository.
@tinrab
tinrab / action.ts
Last active May 5, 2024 00:21
Calling server actions in client form components
'use server';
export const signUpAction = apiAction(
signUpFormSchema,
async (data): Promise<{ }> => {
// ...
},
);
@rmetzler
rmetzler / gist:2947828
Created June 18, 2012 10:43
find all non UTF-8 encoded files
find . -type f | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" > utf8_fail
@maratori
maratori / .golangci.yml
Last active May 5, 2024 00:18
Golden config for golangci-lint
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021 Marat Reymers
## Golden config for golangci-lint v1.58.0
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt and change it for your needs.
run: