Skip to content

Instantly share code, notes, and snippets.

View Redouane64's full-sized avatar

Redhouane Sobaihi Redouane64

View GitHub Profile
for module in $(find /lib/modules/$(uname -r) -name "nvidia*.ko.zst"); do
echo "Processing $module..."
base="${module%.zst}"
sudo zstd -d "$module" -o "$base" --force
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 \
/var/lib/shim-signed/mok/MOK.priv \
/var/lib/shim-signed/mok/MOK.pem \
"$base"
sudo zstd -f "$base" -o "$module"
sudo rm "$base"
"LD_* scout runtime" information:
{
"steam-runtime-system-info" : {
"version" : "0.20250718.0+srt1",
"path" : "/home/redouane/snap/steam/common/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-system-info"
},
"can-write-uinput" : true,
"steam-installation" : {
"path" : "/home/redouane/snap/steam/common/.local/share/Steam",
"data_path" : "/home/redouane/snap/steam/common/.local/share/Steam",
using System;
using System.Collections.Generic;
using System.Linq;
// 1. this code lives in data access assembly/project
internal /* <- this is important modifier */ class DbContext {
public IQueryable<Object> SomeDbSet { get; }
}
public class SomeRepository {
@Redouane64
Redouane64 / Aggregates.Bill.md
Created November 3, 2022 08:26 — forked from amantinband/Aggregates.Bill.md
Buber Dinner Domain Aggregates

Domain Aggregates

Bill

class Bill
{
    // TODO: Add methods
}
Import-Module posh-git
Import-Module oh-my-posh
Import-Module -Name Terminal-Icons
Set-PoshPrompt -Theme ~/Documents/WindowsPowerShell/craver.omp.json
@Redouane64
Redouane64 / README.txt
Created August 16, 2021 16:18
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@Redouane64
Redouane64 / invalid_state_api_response_configuration.cs
Created February 27, 2021 07:46
AspNet Web API Invalid Model State Response Configuration
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
namespace MyApi.Extension
{
public static class ServiceColltectionExtensions
@Redouane64
Redouane64 / startup_cs_with_versioning_swagger.cs
Last active February 27, 2021 07:39
AspNet Web API with Versioning And Swagger Configuration - Sample
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Versioning;
@Redouane64
Redouane64 / footballTournamentSimulation.cs
Last active September 13, 2020 15:22
Football Tournament Simulation
using System;
using System.Collections.Generic;
namespace FootballTournamentSimulation
{
class Program
{
// A team model.
class Team
{
@Redouane64
Redouane64 / DotNet_DataAnnotation_Validation.cs
Created September 13, 2020 13:50
Validate POCOs in .NET - Examples
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Xunit;
using Xunit.Abstractions;
namespace DataAnnotationsAndValidation
{
public class ValidationTests
{