Skip to content

Instantly share code, notes, and snippets.

View zc0rp10's full-sized avatar

Björn Fällbom zc0rp10

View GitHub Profile
@zc0rp10
zc0rp10 / 00_rider_keyboard_shortcuts.adoc
Last active February 13, 2022 20:27
A collection of the keyboard shotcuts and snippets I find myself searching for most often.

Björn Fällbom <zcorpio@gmail.com>

My Jetbrain Rider Shortcuts (VS Code Keymap)

A collection of the keyboard shotcuts and snippets I find myself searching for most often.

Not Yet Organized

@zc0rp10
zc0rp10 / notes.adoc
Last active February 12, 2022 16:53
Notes

POCO

if (a > b && a > c)
large = a;
else if (b > a && b > c)
large = b;
else
large = c;
@zc0rp10
zc0rp10 / 00_visual_studio_keyboard_shortcuts.md
Last active February 9, 2021 08:27
My Visual Studio Shortcuts #visualstudio #shortcuts

My Visual Studio Shortcuts

A collection of the keyboard shotcuts and snippets I find myself searching for most often.

Nya

Shortcut Action
CTRL + SHIFT + SPACE Open IntelliSense (Then, ARROW KEY to cycle through)
F1 Display .NET Docs for highligted identifier i.e a variable, built in class etc.
F2 Rename all instances of an identifier i.e a variable, class or function
SHIFT + F11 Step Out
@zc0rp10
zc0rp10 / 1_Node_Module_System.md
Last active December 28, 2020 09:04
My NodeJS Course Notes #nodejs

Node Module System

Global Object

A global object is part of the global scope. This mean we can access it from anywhere, any file, in our "program". line break Examples of global objects in JavaScript are: console.log(), setTimeout(), clearTimeout(), setInterval(), clearInterval().

In browsers the global scope is represented by the window object. This means all variables and functions that exist in the global scope can be accessed via this object. For example window.console.log(). However you would normaly access it by the short hand us of just console.log().

@zc0rp10
zc0rp10 / Cart Manipulation Functions.md
Last active December 28, 2020 09:04
Functions for manipulating a Shopping Cart made up of an array, held in State. #react

State

[ cartItems, setCartItems ] = useState([])

Add To Cart

function addToCart(newItem) {
 setCartItems(prevItems =&gt; [...prevItems, newItem])
@zc0rp10
zc0rp10 / useToggle.md
Last active December 28, 2020 09:03
React Toggler Hook - useToggle #react
import {useState} from "react"

function useToggler(defaultOnValue = false) {
    
    const [isToggledOn, setIsToggledOn] = useState(defaultOnValue)
    
    function toggle() {
        setIsToggledOn(prev => !prev)
 }