Skip to content

Instantly share code, notes, and snippets.

Avatar
👽

Darian Nocera darnocer

👽
View GitHub Profile
@darnocer
darnocer / notlastchild.md
Created Mar 20, 2021
Exclude Last Child from Styles
View notlastchild.md

Exclude Last Child from Styles

.class{
  &:not(:last-child) {
    margin-right: 1rem;
  }
}
@darnocer
darnocer / githubcode.md
Created Feb 24, 2021
Browse Code in Github
View githubcode.md

Browsing Code in Github

Browse code in Github repos as you would in VSCode:

  • Replace github with github1s in the address bar of any repo

Example

https://github1s.com/darnocer/darnocer.github.io
@darnocer
darnocer / nextjs.md
Created Feb 6, 2021
Creating Next.js Website
View nextjs.md

Next.js

Create

npx create-next-app

Get Started

npm run dev
View filter.md

filter()

Syntax

const filteredArray = oldArray.filter(callbackFunction(element[,index[,array]])[, thisArg])

Example

View es6syntax.md

ES6 Syntax

Functions

ES5

function greetings (name) {
 return 'hello ' + name
}
View falsey.md

Falsey Values in Javascript

false // boolean false
0 // number zero
"" // empty string
null
undefined
NaN // Not A Number
@darnocer
darnocer / AHKshortcut.md
Created Jan 24, 2021
Useful AHK Shortcut
View AHKshortcut.md

Useful AHK Script

Use the following script to add a semi-colon to the end of the line, and jump to the next line

!Enter::Send, {End};{Return}
View mediaqueries.md

Media Queries

Mobile-First

Styles for screens larger than 768px

@media only screen and (min-width: 768px) {

/* CSS Here */

}
@darnocer
darnocer / margins.md
Last active Jan 24, 2021
Margin Syntax
View margins.md

Margin Syntax

4 values

margin: top right bottom left;

3 values

margin: top right/left bottom;
@darnocer
darnocer / boxshadow.md
Created Jan 17, 2021
Box Shadow CSS Property Syntax
View boxshadow.md

Box Shadow Syntax

/* box-shadow: none|y-offset x-offset blur spread color |inset|initial|inherit;` */

#example1 {
  box-shadow: 10px 10px 8px 10px #888888;
}