Skip to content

Instantly share code, notes, and snippets.

@luismts
luismts / GitCommitBestPractices.md
Last active December 26, 2024 07:43
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@rahilwazir
rahilwazir / vmdk_vhdx.md
Last active December 26, 2024 07:41
Convert VMWare to Hyper-V (vmdk to vhdx)
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@schnell18
schnell18 / create_chrootjail.sh
Created November 3, 2013 05:23
Script to automate the creation of chroot jail w/ minimal executables to run git.
#!/bin/sh
# script to automate the creation of chroot jail
# w/ minimal executables to run git
export CHROOT=/var/chroot
function copy_binary() {
for i in $(ldd $*|grep -v dynamic|cut -d " " -f 3|sed 's/://'|sort|uniq)
do
cp --parents $i $CHROOT
@a-sync
a-sync / nava.downloader.bat
Last active December 26, 2024 07:28
nava.hu URL alapján letölti a videót yt-dlp segítségével
@if (@a==@b) @end /*
@echo off & setlocal enabledelayedexpansion
title nava.downloader.bat @ https://gist.github.com/a-sync
if "%~1"=="/?" goto usage
if %0 == "%~0" (
set /p INPUT="nava.hu URL: "
) else (
set "INPUT=%~1"
)
@a-sync
a-sync / m3-downloader.bat
Last active December 26, 2024 07:28
m3 archívum URL vagy M3- ill. RADIO- azonosító alapján letölti a műsort yt-dlp segítségével
@if (@a==@b) @end /*
@echo off & setlocal
title m3-downloader.bat @ https://gist.github.com/a-sync
if "%~1"=="/?" goto usage
if %0 == "%~0" (
set /p INPUT="ID/URL: "
) else (
set "INPUT=%~1"
)
@Dreamer0x01
Dreamer0x01 / composer_beget.txt
Last active December 26, 2024 07:28
Команды composer на хостинге beget
На некторых хостингах, в том числе хостинге beget, требуется явно указывать версию php для композера, так как версия php в консоли часто отличается от версии, заданной в контрольной панели для сайта.
(Текущую версию php для консоли можно узнать командой php -v)
Например, для версии 7.4 команда будет такая:
composer-php7.4 install
Для других версий php алиасы соответствующих версий будут такими:
composer-php5.3
composer-php5.4
composer-php5.5
composer-php5.6
conda create -n ag python=3.11
conda activate ag
pip install autogenstudio
autogenstudio ui --port 8081
@wojteklu
wojteklu / clean_code.md
Last active December 26, 2024 07:24
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

@vasanthk
vasanthk / System Design.md
Last active December 26, 2024 07:23
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?