Skip to content

Instantly share code, notes, and snippets.

View MattAlp's full-sized avatar
❄️

Matt MattAlp

❄️
View GitHub Profile
@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active September 20, 2024 05:19
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@ekzhang
ekzhang / Buildcarte.ipynb
Last active July 11, 2024 01:58
Build Systems à la Carte — Python edition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

immutable = deeply frozen

Immutable classes

Immutable core classes

  • TrueClass
  • FalseClass
  • NilClass
  • Integer
@pmenke-de
pmenke-de / README.md
Last active May 10, 2024 09:54 — forked from chpatrick/nix-cmake
Using CLion with Nix

let's say you have a C++ project in Nix that you want to work on with CLion so that the nix dependencies are available.

  1. create a .nix utility directory in your project directory.
  2. put the below nix-run.sh and nix-cmake.sh in the .nix directory.
  3. in the .nix directory create symlinks for make, gcc, g++ - and maybe more tools, that need to have the nix dependencies and build tools available - and point them to nix-run.sh
  4. then, in Settings -> Build, Execution, Deployment -> Toolchains set CMake to the path to nix-cmake.sh and point all other build tools to the symlinks you've created.
@ityonemo
ityonemo / test.md
Last active September 12, 2024 16:14
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@spalladino
spalladino / falsehoods-that-ethereum-programmers-believe.md
Last active May 20, 2024 21:04
Falsehoods that Ethereum programmers believe

Falsehoods that Ethereum programmers believe

I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.

About Gas

Calling estimateGas will return the gas required by my transaction

Calling estimateGas will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i

@jthodge
jthodge / universal-switcher
Created September 6, 2020 22:07
Show macOS app switcher across all monitors
defaults write com.apple.Dock appswitcher-all-displays -bool true
killall Dock
@natowi
natowi / audio2midi.md
Last active September 18, 2024 14:21
List of open source audio to midi packages
@lyninx
lyninx / partition.ex
Last active July 8, 2020 19:41
elixir function for splitting lists into equal sized chunks, written using recursion
# `partition/2` splits a list into smaller lists of a given size, using recursion!
#
# usage:
# list = [:one, :two, :three, :four, :five]
# partition(list, 2)
# > [[:one, :two], [:three, :four], [:five]]
def partition(list, partition_size)
when is_list(list)
and is_integer(partition_size)
@kipply
kipply / profile.rb
Last active September 17, 2022 08:41
Ruby Code ||= Lazy Initialization Profiling
# When run on the following 20 repositories, it found 2082 ||= and it was used as lazy init 64.3% of the time
# Those numbers are fuzzy, as there is not certain way to prove if something was used as a lazy init
# This script only marks a usage as a lazy init if the variable is being set to a constant,
# in which case if it is not a lazy init then the developers have done something weird.
# It is also marked as a lazy init if the variable is an instance variable or a class variable (either @var or @@var)
# AND the lazy init is used in the top level of a function, AND the function name is contained by the variable or vice versa.
# These are almost certain to be lazy initialized because the assumed behaviour is to always call the method instead of the variable,
# and other usages would be both weird usage of instance/class variables and/or weird usage of the method naming
# This of course, misses a variety of cases but likely does not get any cases that do not lazy initialize.
# A better way to profile could be