Skip to content

Instantly share code, notes, and snippets.

View maddouri's full-sized avatar

Yassine MADDOURI maddouri

View GitHub Profile
@maddouri
maddouri / cd_without_writing_cd.bashrc.sh
Created September 10, 2019 17:45
cd just by typing the directory's path in bash 🔥
# https://unix.stackexchange.com/a/37182/140618
shopt -s autocd
@MattPD
MattPD / cpp.std.coroutines.draft.md
Last active September 14, 2024 16:44
C++ links: Coroutines (WIP draft)
@Mike-Devel
Mike-Devel / Boostdep.png
Last active November 29, 2019 18:35
Boost dependency graph with cmake coloring
Boostdep.png
@maddouri
maddouri / on_scope_exit.hpp
Last active July 27, 2019 19:56
Neat C++11 scope guard inspired by Andrei Alexandrescu's CppCon 2015 talk about declarative control flow
#pragma once
#include <cstdint>
#include <exception>
#include <type_traits>
#include <utility>
// Usage
// ON_SCOPE_EXIT <callable> ;
// ON_SCOPE_EXIT_FAIL <callable> ;
@rise-worlds
rise-worlds / For Mac 4.2.6 unlimited trial.md
Last active September 17, 2024 15:12 — forked from satish-setty/trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active September 20, 2024 14:24
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@norlin
norlin / UE5-Project.sublime-build
Last active December 7, 2022 19:26
Build system for Unreal Engine projects for Sublime Text
{
"cmd": [
// Default path for UE 5
"C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles/Build.bat",
// Build configuration is set to "Development" by default
"Development",
// The platform is set to Win64 by default
"Win64",
"-Project",
// The Sublime project name must match the Unreal project filename
@jessfraz
jessfraz / boxstarter.ps1
Last active July 7, 2024 22:46
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@jimmywarting
jimmywarting / readme.md
Last active September 19, 2024 08:23
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active September 14, 2024 16:30
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub