Skip to content

Instantly share code, notes, and snippets.

View vonnenaut's full-sized avatar

Dan vonnenaut

View GitHub Profile
@vonnenaut
vonnenaut / rot13.md
Last active August 17, 2020 14:53
Rot13
function processCharacter(char, charCode) {
  let newChar = '';

  if (char.match(/[A-Z]/)) {
    if (charCode > 90) {
      charCode -= 26;
    }
    newChar = String.fromCharCode(charCode);
  } else if (char.match(/[a-z]/)) {

C

  • C is pass-by-value but pointers can be used for pass-by-reference parameterization
  • C has 4 types of scope:
    • file (declaration outside any block or parameter list)
    • block (inside block or parameter list)
    • function prototype (within list of parameter declarations within a function prototype)
    • function (between curly brackets of a function definition)
  • objects have four available storage durations, i.e., lifetimes: automatic (block scope), static (file scope, or block scope when using static specifier), thread (in concurrent programming) and allocated (dynamically allocated memory)
@vonnenaut
vonnenaut / api.md
Last active December 15, 2020 06:34
APIs
@vonnenaut
vonnenaut / chrome_dev_tools.md
Last active August 10, 2020 08:13
Chrome Developer Tools

Chrome Developer Tools

Breakpoints

https://developers.google.com/web/tools/chrome-devtools/javascript/breakpoints#loc

  • Add a line of debugger; anywhere in your code to create a breakpoint when running it with Chrome Developer Tools; this is similar to clicking a line number inside Chrome Dev Tools itself.
  • Add a conditional breakpoint by riht-clicking the line and 'add conditional breakpoint', enter a condition and press enter
  • use the Breakpoints pane to manage existing breakpoints, including disabling or removing them
  • use DOM change breakpoints to pause on the code that changes a DOM node or its children
  • use XHR breakpoints to break when the request URL of an XHR contains a specified string
@vonnenaut
vonnenaut / interviewing.md
Last active May 21, 2021 08:37
interviewing

Interview Preparation

BUD Optimization

Check for and eliminate:

  • Bottlenecks
  • Unnecessary Work
  • Duplicated Work

 

@vonnenaut
vonnenaut / ssh.md
Last active June 5, 2021 04:28
SSH
@vonnenaut
vonnenaut / vscode.md
Last active August 11, 2021 08:49
Visual Studio Code

Visual Studio Code

Shortcuts

Key(s) Description
ctrl + shift + spacebar show signature options pop up while writing a call to a built-in method
ctrl + shift + p command palette
F5 Start debugging
ctrl + F5 run without debugging
alt + z toggle word wrap
@vonnenaut
vonnenaut / ds_algo.md
Last active July 28, 2020 02:28
Data Structures and Algorithms

Data Structures and Algorithms

Binary Search

(divide and conquer algorithm)

Bsearch(List, left, right, search_term)

initially: left = 0 r = n-1

@vonnenaut
vonnenaut / python.md
Last active June 19, 2021 09:37
Python

Python

Data types

  • integer, float, string, boolean
  • lists, dictionaries, sets, frozen sets, tuples, byte, bytearray

Comments