Skip to content

Instantly share code, notes, and snippets.

View sam-ghosh's full-sized avatar

Sam G sam-ghosh

View GitHub Profile
@oschannel
oschannel / pyenv_basics_cheatsheet.md
Last active April 17, 2022 09:16
PYENV BASICS CHEATSHEET | by OsChannel.com

Watch a video tutorial about below on OsChannel.com: https://youtu.be/WVISFQpstJE

PyEnv Basics Cheatsheet Contains:

  • Installation of PyEnv.
  • Installation of Multiple Python versions including a macOS Fix.
  • Setting Different Python versions for your Projects using multiple ways.
  • Swiching between Python Versions using PyEnv.

To Install pyenv:

Rust Error Handling Cheatsheet - Result handling functions

Introduction to Rust error handling

Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.

Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.

Result is defined as Ok or Err. The definition is generic, and both alternatives have

@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];