Skip to content

Instantly share code, notes, and snippets.

View alexmaday's full-sized avatar

Alex Maday alexmaday

  • Austin, TX
  • 22:03 (UTC -06:00)
View GitHub Profile
@alexmaday
alexmaday / markdown-cheatsheet.md
Created February 16, 2020 20:09
Markdown - the syntax I forget

Strikethrough uses two tildes. ~~Scratch this~~

@alexmaday
alexmaday / Cmder+VSCode.md
Created July 21, 2019 23:50
Use cmder as your integrated terminal inside VS Code

In order to use cmder as your integrated terminal inside VS Code, add this to your settings:

"terminal.integrated.shellArgs.windows": [
    "/k",
    "c:\\path_to\\cmder\\vendor\\init.bat"
  ],
@alexmaday
alexmaday / gulp-watch-v4.md
Last active February 8, 2019 19:28
gulp watch tasks: v3 vs v4

gulp v3

gulp.watch(fileGlob, arrayOfTaskNames)

In gulp 3.x you could just pass the name of a task to gulp.watch() like this:

gulp.task('watch', function() {
  gulp.watch('app/css/*.css', ['styles']);
 gulp.watch('app/js/*.js', ['scripts']);
@alexmaday
alexmaday / gist:ae7859c6b290bdb2fe2859b4a3a53bf5
Created October 11, 2017 20:18 — forked from oliverfernandez/gist:5619180
The operation consists to append 12 nodes to an existing parent node with 1000 children Three ways to do it: 1. Use parentNode.innerHTML += 2. User parentNode.innerHTML = 3. Use a parentNode.appendChild inside a loop. The method with the best performance is the last one. The last method doesn't need to read the current DOM or parse it.
var mainNodeInner = document.createElement('div'),
mainNodeInnerPlus = document.createElement('div'),
mainNodeAppend = document.createElement('div'),
sampleHTML = '<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>',
testHTML = '',
numSamples = 1000,
before = null,
after = null;
//SET UP
@alexmaday
alexmaday / Best-Practices.md
Last active December 30, 2016 14:35
Save time by adhering to these methods

CSS

Typography

Start by setting font-size for all elements to 10px. Then use rems so that all further changes based off a a more intuitive decimal scaling scheme.

@alexmaday
alexmaday / README-Template.md
Created December 4, 2016 17:40 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

/* I always forget this, so: */
.nav ul {
list-style: none;
margin: 0;
padding: 0;
}
.nav li {
display: inline-block;
}
.nav a {
Preprocess sass/scss file:
sass input.scss:output.css
Pre and watch (output is nested which is default):
sass --watch input.scss:output.css
Watch and expand css:
sass --watch --style expanded input.scss:output.css
@alexmaday
alexmaday / bootstrap-template.html
Last active December 4, 2016 17:38
template-html-secure bs-3.3.6+jQ-2.2.4
<!--Add skeleton code with SRI hashes and a link to SRI Hash Generator tool and reminder to create new has for every installation -->
<!-- sri tool: https://www.srihash.org/ -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title Page</title>