Skip to content

Instantly share code, notes, and snippets.

View thm-design's full-sized avatar
Just build it.

Tony H Meyer thm-design

Just build it.
View GitHub Profile
@thm-design
thm-design / Time & space complexity in javascript.md
Created April 18, 2023 22:15
Time & space complexity in javascript

Time & space complexity in javascript

In front-end development

In front-end development, space and time complexity can arise in various cases, such as:

  • DOM manipulation: The time complexity of inserting or removing elements from the DOM can vary depending on the size of the DOM and the specific operation being performed. For example, inserting an element at the end of a large DOM tree could have a time complexity of O(n), while inserting an element at the beginning of a linked list could have a time complexity of O(1).

  • Sorting and searching algorithms: Sorting and searching algorithms can have different space and time complexity depending on the specific algorithm used. For example, the time complexity of the QuickSort algorithm is typically O(n log n), while the space complexity is O(log n). On the other hand, the time and space complexity of the Linear Search algorithm is O(n).

  • Data storage: The space complexity of storing data can vary depending on the data structure used. For example, using

@thm-design
thm-design / Performance and scalability.md
Created April 18, 2023 22:13
Performance and scalability

Performance and scalability

Performance and scalability are important concerns in frontend web engineering, and some common challenges faced include:

  • Slow loading times: Large or complex web pages can take a long time to load, resulting in a poor user experience.
  • Slow response times: Web applications can become slow to respond to user interactions, especially as the number of users grows.
  • High server load: As more users access a web application, the server can become overwhelmed, leading to slow response times and even outages.
  • Poor network performance: The quality of the network connection between the user and the server can have a significant impact on the performance of a web application.
  • Limited memory and processing power: Web browsers have limited memory and processing power, which can impact the performance of web applications.
@thm-design
thm-design / index.html
Created November 23, 2018 18:19 — forked from kentcdodds/index.html
The one true react boilerplate
<body>
<div id="⚛️"></div>
<script src="https://unpkg.com/react@16.0.0/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@16.0.0/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
<script type="text/babel">
ReactDOM.render(<div>Hello World!</div>, document.getElementById('⚛️'))
</script>
</body>
@thm-design
thm-design / index.html
Created October 27, 2018 21:06
SiennaAngelicQuadrants created by thm_design - https://repl.it/@thm_design/SiennaAngelicQuadrants
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="script.js"></script>
@thm-design
thm-design / list.md
Created May 23, 2018 23:17 — forked from notwaldorf/list.md
Meownica's packing list

Meownica's packing list

I travel a lot so I'm down to like 30 minutes of packing per any kind of trip. I always bring one carry-on suitcase for any trips up to 2 weeks (that I never check in unless forced) -- I have an Away suitcase because it's got a built-in (removable) battery, and amazing wheels.

🚨

  • 🆔Wallet & Passport
  • 💧Travel water bottle
  • 💳Travel credit cards (don't pay foreign currency fees!)
  • 💳Insurance cards
  • 💵Local currency you have
  • 🚎Local public transport cards
@thm-design
thm-design / .zshrc
Created September 26, 2017 21:54
My zshell config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
source /Users/tmeyer1/.bash_profile
export ZSH=/Users/tmeyer1/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@thm-design
thm-design / DrawerControl.tsx
Created September 8, 2017 22:38 — forked from erictraut/DrawerControl.tsx
ReactXPDrawerWithConstantWidth
/*
* This file implements a basic drawer control.
*/
import RX = require('reactxp');
interface MainPanelProps extends RX.CommonStyledProps<RX.Types.ViewStyleRuleSet> {
renderDrawer: () => JSX.Element;
renderContent: () => JSX.Element;
}
// Dirty overload the native function
var parseInt = function(arg1) {
if (arg1 === "Infinity") {
return NaN;
}
if (arg1 === "Infinity+1") {
return "Infinity+1";
}
if (arg1 === "1+1+1") {
return "3?";