Skip to content

Instantly share code, notes, and snippets.

View aryansabet's full-sized avatar
😁

Aryan Sabet Nejad aryansabet

😁
  • IUST
  • Tehran, Iran
View GitHub Profile
@karpolan
karpolan / .prettierrc.js
Last active December 23, 2025 08:51
Prettier config for React App
module.exports = {
printWidth: 120, // max 120 chars in line, code is easy to read
useTabs: false, // use spaces instead of tabs
tabWidth: 2, // "visual width" of of the "tab"
trailingComma: 'es5', // add trailing commas in objects, arrays, etc.
semi: true, // add ; when needed
singleQuote: true, // '' for stings instead of ""
bracketSpacing: true, // import { some } ... instead of import {some} ...
arrowParens: 'always', // braces even for single param in arrow functions (a) => { }
jsxSingleQuote: false, // "" for react props, like in html
@TheCherno
TheCherno / Instrumentor.h
Last active April 3, 2026 08:43
Basic Instrumentation Profiler
//
// Basic instrumentation profiler by Cherno
// Usage: include this header file somewhere in your code (eg. precompiled header), and then use like:
//
// Instrumentor::Get().BeginSession("Session Name"); // Begin session
// {
// InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling
// // Code
// }
@ChristophSchmidl
ChristophSchmidl / assignment_3.md
Last active December 31, 2022 07:56
Operating Systems - Assignment 3

Reading Materials:

  • chapter 6.1-6.7
  • chapter 7.1-7.6

Weekly Exercise:

  • 6.10: The implementation of mutex locks provided in Section 6.5 suffers from busy waiting. Describe what changes would be necessary so that a process waiting to acquire a mutex lock would be blocked and placed into a waiting queue until the lock became available.
  • 6.14 Consider the code example for allocating and releasing processes shown in Figure 6.23.
  • a. Identify the race condition(s).
@kmorcinek
kmorcinek / .gitignore
Last active December 9, 2025 17:42
.gitignore for C# projects
# The following command works for downloading when using Git for Windows:
# curl -LOf https://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate https://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files