Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@metal3d
metal3d / PythonDIArticle.md
Last active April 23, 2024 15:37
Python DI

Python et l'injection de dépendance

Ah, ça... quand on parle d'injection et de dépendance, on s'attend tout de suite à se prendre une flopée de visiteurs en manque de substance plus ou moins illicites. En réalité, on va parler "pattern". Et surtout, je vais lancer un vieux pavé dans la marre en disant qu'en Python c'est pas super utile, ou du moins que le langage permet déjà de le gérer sans se faire mal.

Piqure de rappel

Conversation un matin au travail:

@spoike
spoike / svg_paths_cheatsheet.md
Last active April 23, 2024 15:36
Cheatsheet for SVG paths

Cheatsheet for SVG Path Data

Straight line commands

+------------+-------------------+--------+
| *M* or *m* | moveto            | (x y)+ |
+------------+-------------------+--------+
| *Z* or *z* | close path        | (none) |
+------------+-------------------+--------+
@Nexarian
Nexarian / xrdp-nvidia-setup.sh
Last active April 23, 2024 15:36
Setup for XRDP using Nvidia Acceleration
#!/usr/bin/env bash
set -e
cd ~
sudo -v
# Make sure system is in a good, updated, clean, state.
sudo apt-get -y update
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 23, 2024 15:35
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@theguptaji
theguptaji / setup.md
Last active April 23, 2024 15:34
Setup nodemon for Typescript/express/ejs

Install nodemon in project dir

npm install -D nodemon

Create config file for nodemon in root folder named nodemon.json with following content

{
    "restartable": "rs",
    "ignore": [".git", "node_modules/"],
 "watch": ["src/"],
@botamochi6277
botamochi6277 / PIDController.cs
Last active April 23, 2024 15:33
Unity PID controller for position and rotation
using System.Collections;
using System.Collections.Generic;
// using Sirenix.OdinInspector;
using UnityEngine;
using UnityEngine.Serialization;
namespace BotaLab
{
/**
* @brief A Unity Component to control position and rotation with PID controller
@harinij
harinij / webflowapi.js
Created April 23, 2024 15:32
Displaying External API data in Webflow using BuildShip
<script>
// Function to fetch data from the API
function fetchData() {
const apiUrl = 'https://0dc3ke.buildship.run/webflowapi'; // Replace with your API URL
fetch(apiUrl)
.then(response => response.json())
.then(data => {
displayData(data);
@catalinmiron
catalinmiron / README.md
Created April 16, 2024 20:36
Expo app.json Apple Privacy Manifest

About

The privacy details that you may need to add for Apple Privacy Manifest.

This config plugin it's already available from expo >=50.0.17 (Part of this PR by aleqsio)

Tip

Read more about Privacy Manifest File from Apple docs

@l-0-l
l-0-l / 01_kernel_dev_setup.md
Last active April 23, 2024 15:36
Set up a kernel development environment

Setup a kernel development environment.

The instructions cover cloning and building Linux kernel and the useful qemu wrapper virtme-ng. After performing these actions, you'll find yourself booting into your own machine but in a virtual environment and with the kernel you've built, while remaining with the same user and files. All of this has been tested on Debian 12 Bookworm, x86_64. Remember, YMMV! Please contribute.

Setup your work directory, we'll put it under your home:

mkdir ~/work && cd ~/work

Make sure you have the necessary packages installed. This is not a comprehensive list.

sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev bc dwarves

Get the kernel source:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 23, 2024 15:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname