Skip to content

Instantly share code, notes, and snippets.

View WebDevBooster's full-sized avatar

Alex Booster WebDevBooster

View GitHub Profile
@gaearon
gaearon / Classes.js
Created May 27, 2020 17:38
Beneath Classes: Prototypes
class Spiderman {
lookOut() {
alert('My Spider-Sense is tingling.');
}
}
let miles = new Spiderman();
miles.lookOut();
@WebDevBooster
WebDevBooster / scroll.js
Last active February 3, 2018 10:23 — forked from planetoftheweb/scroll.js
Smooth scrolling effect, can be used for Bootstrap 4 navigation. Requires a full version of jQuery in order for this to work. (jquery.slim is insufficient)
$(function() {
var topoffset = 70; //variable for menu height
//Use smooth scrolling when clicking on navigation
$('.navbar-nav a').click(function() {
if (location.pathname.replace(/^\//,'') ===
this.pathname.replace(/^\//,'') &&
location.hostname === this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 30, 2024 18:21
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@stowball
stowball / front-end-checklist.md
Last active October 4, 2017 20:17
Front-End PR Checklist

Answer Y/N/NA to all questions as appropriate.
Delete sections that don't apply.

Linting
Have you fixed all:

  • CSS errors?
  • JS errors?

Browsers
Have you tested this in:

@odan
odan / xampp_php7_xdebug.md
Last active April 17, 2024 05:36
Installing Xdebug for XAMPP
@Miserlou
Miserlou / cities.json
Created April 30, 2015 06:58
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
[
{
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
},

Git Cheat Sheet

Commands

Getting Started

git init

or

@colintoh
colintoh / douchebag-vertical-align.css
Created October 27, 2014 07:08
douchebag way of vertical alignment
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
@windyjonas
windyjonas / wordpress-escaping.md
Last active September 21, 2020 16:10
Most of the escaping functions in WordPress, with a short explanation and example.

WordPress escaping functions

By: Jonas Nordström, @windyjonas
Date: 2013-04-16

esc_attr( $text );
Encodes the <, >, &, " and ' (less than, greater than, ampersand, double quote and single quote) characters. Will never double encode entities.
Example: