Skip to content

A collection of helpful resources for web development.

License

Notifications You must be signed in to change notification settings

isarisariver/webdev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

A collection of helpful resources for web development

This repository contains a number of resources, cheat sheets and snippets that have helped me in my web development projects. Most of it is aimed at beginners.

Overview

The resources are divided into the following categories:

General

Link Description
fullstackopen.com MOOC course for Modern Web Development
Sometimes Google and Youtube dont load: PR_END_OF_FILE_ERROR Related to Firefox
When should one use a 'www' subdomain? Are there any good reasons to use or not to use the 'www' subdomain?
How programmers find their startup ideas
browser-extension-template Barebones boilerplate with webpack, options handler and auto-publishing
Webstorm - Navigation Features That Will Make You Faster Official Blogpost by Jetbrains
4 Steps To Building A Bulletproof Beta Test Find the right community, Trust your testers, Filter out the noise, Maintain long-term relationships.
15+ Chrome extensions you should have in your pocket.
AWS IP address ranges
How to Launch on Product Hunt Official guide by ProductHunt
Create good titles and snippets in Search Results Guide by Google
CodeNewbie A community of programmers
Sample Privacy Policy Template
6 Super cool Websites For Practicing Algorithms, Learning Programming
FreeCodeCamp Freecodecamp - Learn to code at home
Color model - Wikipedia RGB, HSL and more
The color system - Material Design Tools for picking colors
color-hex.com Color Palettes
Callback (computer programming)
Single-responsibility principle - Wikipedia article
Input/output Wikipedia article
weatherstack API Retrieve instant, accurate weather information for any location in the world in lightweight JSON format
curl command line tool and library
Markdown Tables generator
Scaler Explore the Web Development Roadmap! Learn about the latest trends and skills to stay ahead in the ever-changing world of web development.

Html

Link Description
What is Rel=”Noopener” Article about link vulnerabilities
Performance and security of target=_blank links with rel=noopener Article about link vulnerabilities
Target=”_blank” — the most underestimated vulnerability ever Another article about the vulnerabilities of links
Explained: noopener, noreferrer, and nofollow Values
HTML Encoding Reference How to escape any character in Html
Internetingishard Friendly web development tutorials for complete beginners
hyperlink - How to open link in new tab on html?
input type="date" MDN reference for date input
Character Entity Reference Chart
Key shortcuts, Unicode and UTF-8 tables A list of all HTML Entities for HTML 4.0 webpages

CSS

Link Description
How to keep your footer where it belongs ?
Prevent line-break of span element white-space:nowrap
Media Queries for Standard Devices List a ton of different devices and media queries
box-shadow Guide to box-shadows
Pleasing Color Palettes Examples of pleasing color palettes
Beautiful CSS box-shadow examples copy the code of box-shadow examples of various websites
styling scrollbars
CSS Language Speak: Container vs Wrapper? There is no difference between them.
This site teaches the CSS fundamentals that are used in any website's layout. Guide to learn CSS layout
almost all CSS2 and 3 selectors, and the CSS3 UI selectors
CSS '>' selector; what is it? > selects immediate children
How should I organize the contents of my CSS file(s)? Firstly, and most importantly, document your CSS.
What Is A CSS Reset? Reset the styling of all HTML elements to a consistent baseline
Which CSS Reset Should I Use?
CSS height property w3schools
How To Create Custom Select Menus w3schools
BEM — Block Element Modifier
mediaqueri.es Media Queries
Staggered Animations with CSS Custom Properties
Learn how to shake/wiggle an image with CSS w3schools
CSS Pagination Examples w3schools
Vertical align anything with just 3 lines of CSS
Cursor Styles

Javascript

Link Description
How to make modals draggable and resizable Tutorial
Check if Shift Key is pressed during mouse-click Tutorial
How to Fix the Refresh Button When Using Service Workers Tutorial
How to add fireworks to your website Tutorial
How to convert an Object {} to an Array [] of key-value pairs in JavaScript? 3 Methods to convert an Object {} to an Array []
Check If An Object Is Empty or not In JavaScript 8 ways To Check If An Object Is Empty or not
Convert array to JSON all modern browsers include the JSON object as standard, which means that you don't need this script
How to add whitespace in Javascript multiple ways to add whitespaces with Html and JS
Deploying ES2015+ Code in Production Today Article
Determine font color based on background color
35+ Amazing JavaScript Games with Source Code
Understanding Lazy Loading
Can I insert elements to the beginning of an element using .appendChild()? DOM nodes have an insertBefore method
What's the effect of adding 'return false' to a click event listener? The modern way of achieving this effect is to call event.preventDefault()
How to detect Safari, Chrome, IE, Firefox and Opera browser?
The blur event fires when an element has lost focus. MDN reference
Window.open() - Web APIs MDN reference
Working with objects - JavaScript MDN reference
A re-introduction to JavaScript (JS tutorial) MDN reference
Destructuring assignment MDN reference
Array Common Operations MDN reference
WindowOrWorkerGlobalScope.fetch() MDN reference
Arrow function expressions MDN reference
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet MDN reference
Understanding how a JavaScript ES6 debounce function works
regex101.com Regex tester
How to create a link in JavaScript ? Tutorial
JavaScript CreateElement
Sort array by firstname (alphabetically) in Javascript How to use the sort method
addEventListener, “change” and option selection Add items to a select list
how to pass a function name via JSON and call it in javascript/jQuery?
How To Copy to Clipboard w3schools
JavaScript Roundup
David Walsh Blog
Regex tutorial A quick cheatsheet by examples
Douglas Crockford's JavaScript
javascript.info The Modern JavaScript Tutorial
javascript.info Javascript animations
javascript.info Promises chaining
Learn how to build a full-stack, production-ready JavaScript web application from scratch
You Don't Know JS Yet (book series) - 2nd Edition
Index as a key is an anti-pattern
You Don't Know JS: Async & Performance - Chapter 3: Promises
ES7 async functions - a step in the wrong direction
How To Generate a Random Color in JavaScript
A Guide To The Reduce Method In Javascript​
ES6 In Depth: Arrow functions

Node JS / Express JS

Link Description
Node / Express: EADDRINUSE, Address already in use – Kill server How to kill node server, if it is still running
Learn how caching your web page's static resources can improve performance and reliability for repeat visitors.
Redirecting HTTP to HTTPS with Node.js & Express
Force SSL with expressjs 3
How to send urlencoded data using Axios
Express 4.x - API Reference API reference
Persisting your React state in 9 lines
Understanding Express.js
Express cors middleware
How to Make HTTP Requests using Axios in Node.js

Heroku

Link Description
QuotaGuard Static IP's How to serve Heroku apps from a static IP (e.g. for whitelisting)
'heroku' does not appear to be a git repository
Optimizing Dyno Usage Official reference
Connecting Heroku App to Atlas MongoDB Cloud service
Add a custom root domain Official reference

React

Link Description
How to migrate from create-react-app to Next.js Tutorial
Production build not running on IE11 <meta http-equiv="X-UA-Compatible" content="IE=edge">
Showing "new version available" notification on create-react-app PWAs How to refresh service worker
How to Create a Right-click Menu in React How to create a custom context menu
Start to Finish: Deploying a React App on DigitalOcean
milliseconds to days
What is React Fast Refresh
Getting Started With Next.js
React v17.0 blogpost Official blogpost
Tips for Using React’s UseEffect Effectively
This hook makes it super easy to dynamically load an external script and know when its loaded custom hook to load external scripts in React
Everything you need to know about react-scripts
Your new ReactJS on Sublime Text 3 workspace setup
A Complete Guide to useEffect VERY detailed article by Dan Abramov
React Higher Order Components
The Wise Guide to React useState() Hook
3 Essential Tools to Boost your React App’s SEO
React SEO: The Best Optimization Methods for React Websites
How to Use the Enter Key Event Handler
How to implement Authentication in React using Auth0
React Production Deployment with Netlify
How To Implement Smooth Transitions in React
An Opinionated Guide to React: Folder Structure & File Naming
React Production Deployment with Heroku Tutorial
React Confirm Dialog as a service Create custom confirm box
How To Build a Secure Login Flow With OAuth 2, OpenId, and React
How to use the useCallback React hook
How to Implement Authentication For Your React App
React Simple Auth: React + Redux + OAuth 2.0 Tutorial
How to Securely Implement OAuth in React
How to send HTTP Requests in React
React Warning: Cannot update a component from inside the function body of a different component wrap state update in useEffect()
Refs and the DOM
The broken promise of Web Components
The React Cheatsheet for 2020 (+ real-world examples)
How to use realm on an electron app?
Electron Data Persistence
Useful resources for building apps with Electron
Mongotron - A Mongo DB GUI built using Electron, and Angular Js

Libraries

Link Description
Fireworks Add fireworks to your website
HTML5sortable Lightweight standalone library for creating sortable lists and grids using native HTML5 drag and drop API.
React beautiful DND Beautiful and accessible drag and drop for lists with React
React DnD A set of React utilities to help you build complex drag and drop interfaces while keeping your components decoupled
immutability-helper React - Mutate a copy of data without changing the original source
react-lazyload Lazyload your Components, Images or anything matters the performance.
nodemailer Node.js Send an Email
Semantic UI Semantic is a development framework that helps create beautiful, responsive layouts using human-friendly HTML.
heroku-ssl-redirect Redirect users to the SSL version of your app. For ExpressJS running on Heroku.
bcrypt for NodeJs
JSON Server Get a full fake REST API with zero coding in less than 30 seconds
ExpressJS Fast, unopinionated, minimalist web framework for Node.js
nodemon automatic refresh for node
Body Parser Node.js body parsing middleware.
morgan HTTP request logger middleware for node.js
CORS A node.js package for providing a Connect/Express middleware
Mongoose MongoDB object modeling tool designed to work in an asynchronous environment
Mongoose encryption Simple encryption and authentication plugin for Mongoose
Dotenv zero-dependency module that loads environment variables from a .env file into process.env
SuperTest library to help with testing API
cross-env library to enable cross platform scripts
mongoose-unique-validator check unique entries in MongoDB
jsonwebtoken generate JSON webtokens
react-transition-group animations on render
React bootstrap UI Library for React
React Markdown Markdown component for React using remark
Styled Components Use the best bits of ES6 and CSS to style your apps without stress

Landing Page

Link Description
Free Templates on Cruip.com Download Landing Page templates
Pricing Page examples
What is a Landing Page and How to Create One in 2020!
Landing Page Feedback Trello Board A Trello board with feedback on various landing pages
Rewriting landing pages with a pro copywriter
Get free landing pages every week.
Why Landing Page is Crucial for your App Success?

Mongo DB

Link Description
mongodump and mongorestore Official reference
Mongoose’s Model.Populate() how to use populate() method
Secure Your Database With MongoDB Atlas Official blog article
MongoDB Security Checklist & Best Practices Official reference
Mongoose rename collection
MongoDB’s field-level encryption protects private data
Securing MongoDB using Let's Encrypt certificate

Design

Link Description
CSS Tips for Better Color and Contrast Accessibility
Applying Color Theory to Digital Displays
Draw Pixel art
How to start making pixel art #1
The Top 10 Web Design Mistakes of 1999
Material Design - color usage and palettes
The Responsive Website Font Size Guidelines
Converting Colors Convert any color to various different formats
svgrepo.com SVG Vectors and Icons
Nerd fonts Iconic font aggregator
flaticon.com
Font Awesome
The 41 best free web fonts

Git / GitHub

Link Description
Change remote repository url official reference
Managing your profile README official reference
Searching issues and pull requests official reference
Pushing commits to a remote repository official reference
How can I delete a file from a Git repository? Use git rm.
How to show or change your Git username or email address git config --global user.name "username"
Getting Started - About Version Control
How to Configure Git Username and Email Address
How does one change the language of the command line interface of Git?
Tell Git not to track a file any more (remove from repo)
Why are there two ways to unstage a file in Git? git reset
How To Create a Pull Request on GitHub
How to restore older file versions in Git
An Intro to Git and GitHub for Beginners (Tutorial)

VS Code

Link Description
Learn these keyboard shortcuts to become a VS Code ninja
Recommended VS Code Extensions
Snippets in Visual Studio Code

Security, CORS and Authentication

Link Description
How to Check for TLS to Secure Your Email
Security framework for building multi-user end-to-end encrypted data storage
JWT.IO allows you to decode, verify and generate JSON Web Tokens
Cross-Origin Resource Sharing (CORS)
Cross-Site Request Forgery Prevention
The Authorization Request OAuth 2.0 Simplified
Single-Page Apps OAuth 2.0 Simplified
3 Ways to Fix the CORS Error How the Access-Control-Allow-Origin Header Works
How and Why You Should Avoid CORS in Single Page Apps
enable cross-origin resource sharing
XMLHttpRequest cannot load XXX No 'Access-Control-Allow-Origin' header

Auth0

Link Description
JWT Handbook
Hacking It Out: When CORS won’t let you be great
The Complete Guide to React User Authentication with Auth0 official blog
Send Email Invitations for Application Signup official reference

Videos

Link Description
Higher-order functions - Part 1 of Functional Programming in JavaScript YouTube
Map - Part 2 of Functional Programming in JavaScript YouTube
Reduce basics - Part 3 of Functional Programming in JavaScript YouTube
What the heck is the event loop anyway? YouTube
Update Data in a List without Mutations eggheadio
Getting Started with Redux eggheadio
Understand JavaScript's this Keyword in Depth eggheadio

Snippets and Commands

Html

Escaping Characters

<!-- Escape the following characters with HTML entity encoding to prevent switching into any execution context, such as script, style, or event handlers. Using hex entities is recommended in the spec. In addition to the 5 characters significant in XML (&, <, >, ", '), the forward slash is included as it helps to end an HTML entity. -->

 & --> &amp;
 < --> &lt;
 > --> &gt;
 " --> &quot;
 ' --> &#x27;
 / --> &#x2F;

 <!-- &apos; not recommended because its not in the HTML spec (See: section 24.4.1) &apos; is in the XML and XHTML specs.

 Forward slash is included as it helps end an HTML entity -->

Javascript

Scroll to top

// Scroll to specific values
// scrollTo is the same
window.scroll({
  top: 2500,
  left: 0,
  behavior: 'smooth'
});

// Scroll certain amounts from current position
window.scrollBy({
  top: 100, // could be negative value
  left: 0,
  behavior: 'smooth'
});

// Scroll to a certain element
document.querySelector('.hello').scrollIntoView({
  behavior: 'smooth'
});

Convert RGB to gray

R*0.299 + G*0.587 + B*0.114

Parse Link Header for rel

//API's usually don't provide all entries at once and we have to use pagination to access more entries than the initial dataset. To do this, we don't have to build our own links, but can use the ones provided by the API.

var data = 'link: "<http://localhost:3001/posts?_page=1>; rel="first", <http://localhost:3001/posts?_page=2>; rel="next", <http://localhost:3001/posts?_page=5>; rel="last""'

var linkRegex = /\<([^>]+)/g;
var relRegex = /rel="([^"]+)/g;
var linkArray = [];
var relArray = [];
var finalResult = {};
var temp;
while ((temp = linkRegex.exec(data)) != null) {
    linkArray.push(temp[1]);
}
while ((temp = relRegex.exec(data)) != null) {
    relArray.push(temp[1]);
}

finalResult = relArray.reduce((object, value, index) => {
    object[value] = linkArray[index];
    return object;
}, {});

console.log(finalResult);

Create random value

//create random value for STATE
const generateState = (length) => {

  let result = ""
  const characters =
  "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
  var charactersLength = characters.length
  for ( var i = 0; i < length; i++ ) {
    result += characters.charAt(Math.floor(Math.random() * charactersLength))
  }
  return result
}

Add days to current date

  var today = new Date();
  var newdate = new Date();
  newdate.setDate(today.getDate()+29);
  document.writeln(newdate);

Read Cookie

  const decodedCookie = decodeURIComponent(document.cookie)

  const cookieArray = decodedCookie.split(";")
  for (let i = 0; i < cookieArray.length; i++) {
    if (cookieArray[i].indexOf("category") >= 0) {
      const searchCookie = cookieArray[i].split("=")
      setPreviousSearch(searchCookie[1].split(","))
    }
  }

Terminal (OSX, Linux ...)

Command Description
clear scroll past visible content
touch ‘filename’ create filename
mkdir ‘folder’ create directory
pwd present working directory
ls -al list of files and directories with hidden files
cd .. one directory level up
cd / go to root folder
nano filename display and edit filename
openssl rand -base64 32 Create encrypted key
openssl rand -base64 64 Create encrypted key
pwd present working directory
which find location of variable
man ls help page of “ls”. Quit with q
cat filename display filecontent.
less filename display filecontent, scroll with arrows
nano filename display and modify filecontent
open ~ open home directly
open filename open file in osx
touch filename create filename
mv filename newfilename, mv folder newfolder rename/move filename to newfilename
rm filename remove filename
mkdir folder create directory
rmdir folder remove directory
rm -rf folder remove directory with content
chown user filename change ownership of filename to user
whoami logged-in user
chgrp group filename change usergroup of filename to group
alias newcmd=‘commands" create new command

GIT

- git push --set-upstream origin new-branch
- git config --global user.name "Your name"
- git config --global user.email "Your email"

//Create a new repository

//replace <username> and <repo> with your values
- git clone https://github.com/<username>/<repo>.git
- cd <repo>
- touch README.md
- git add README.md
- git commit -m "add README"
- git push -u origin master

//Push an existing folder
- cd existing_folder
- git init
- git remote add origin https://github.com/<username>/<repo>.git
- git add .
- git commit -m "Initial commit"
- git push -u origin master

//Push an existing Git repository
- cd existing_repo
- git remote rename origin old-origin
- git remote add origin https://github.com/<username>/<repo>.git
- git push -u origin --all
- git push -u origin --tags

//Unlink repository

- git remote rm origin
- rm .git/FETCH_HEAD




Heroku

  • create file "Procfile" with content “web: node index.js” in root of repo
Command Description
heroku create appname --region eu create app on heroku with name “appname” in region eu
git push heroku master deploy local app to heroku-repo
git init create own git repo for heroku app
heroku git:remote -a yourapp add heroku app as remote
heroku ps:scale web=1 check app is running
heroku open start app
heroku logs --tail display logs
heroku run bash open shell for Heroku dyno (e.g. for debugging)

About

A collection of helpful resources for web development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages