Skip to content

Instantly share code, notes, and snippets.

View danielmascena's full-sized avatar
🎯
Focusing

Daniel Mascena danielmascena

🎯
Focusing
View GitHub Profile
@danielmascena
danielmascena / binary.js
Created November 29, 2023 23:00 — forked from mathewmariani/binary.js
A quick look at signed and unsigned integers in JavaScript.
var UInt4 = function (value) {
return (value & 0xF);
};
var Int4 = function (value) {
var ref = UInt4(value);
return (ref > 0x7) ? ref - 0x10 : ref;
};
var UInt8 = function (value) {
@danielmascena
danielmascena / dabblet.css
Created July 14, 2017 15:10
CSS Flexible Layout Module - flex property
/**
* CSS Flexible Layout Module - flex property
*/
* { transition: all 2s; box-sizing: border-box;}
body {
background: #bfbfbf;
}
header,aside,.mainContent,.extraDiv,footer {
padding: 1em;
font-size: 1.4em;
@danielmascena
danielmascena / dabblet.css
Created July 14, 2017 15:10
CSS Flexible Layout Module
/**
* CSS Flexible Layout Module
*/
body {
background: #bfbfbf;
min-height: 100%;
}
header {
background-color: blue;
min-height: 100px;
@danielmascena
danielmascena / dabblet.css
Created July 14, 2017 15:10
CSS Flexible Layout Module - extra div
/**
* CSS Flexible Layout Module - extra div
*/
body {
background: #bfbfbf;
min-height: 100%;
}
header {
background-color: blue;
min-height: 100px;
@danielmascena
danielmascena / dabblet.css
Last active July 14, 2017 16:04
CSS Flexible Layout Module - flexbox styling
/**
* CSS Flexible Layout Module - flexbox styling
*/
* { transition: all 2s; }
body {
background: #bfbfbf;
}
header,aside,.mainContent,.extraDiv,footer {
padding: 1em;
@danielmascena
danielmascena / dabblet.css
Created July 14, 2017 15:10
CSS Flexible Layout Module - flex property
/**
* CSS Flexible Layout Module - flex property
*/
* { transition: all 2s; box-sizing: border-box;}
body {
background: #bfbfbf;
}
header,aside,.mainContent,.extraDiv,footer {
padding: 1em;
font-size: 1.4em;
@danielmascena
danielmascena / dabblet.css
Created July 14, 2017 15:10
CSS Flexible Layout Module - flex property
/**
* CSS Flexible Layout Module - flex property
*/
* { transition: all 2s; box-sizing: border-box;}
body {
background: #bfbfbf;
}
header,aside,.mainContent,.extraDiv,footer {
padding: 1em;
font-size: 1.4em;
@danielmascena
danielmascena / table.css
Created July 7, 2017 15:49 — forked from colintoh/table.css
Table CSS
table { display: table }
tr { display: table-row }
thead { display: table-header-group }
tbody { display: table-row-group }
tfoot { display: table-footer-group }
col { display: table-column }
colgroup { display: table-column-group }
td, th { display: table-cell }
caption { display: table-caption }
@danielmascena
danielmascena / css-selectors.md
Created June 12, 2017 21:38 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
@danielmascena
danielmascena / README.md
Created April 10, 2017 13:11 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version