- 📁 scss
- 📄 style.scss
- 📄 gulpfile.js
- 📄 index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>ConsolidateJS</title> | |
<style type="text/css"> | |
.bg-purple { | |
background-color: rebeccapurple; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'date' | |
today = Date.today | |
first_day = Date.new(today.year, today.month, 1) | |
last_day = Date.new(today.year, today.month, -1) # A trick from JavaScript, heh... | |
first_week_blank_count = first_day.wday | |
last_week_blank_count = last_day.wday |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Courtesy of Kusu | |
/* | |
for (const value of obj) { | |
// loop body | |
} | |
*/ | |
{ | |
const it = obj[Symbol.iterator](); | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Impure | |
reduce = (f, i, l) => (n = [...l]).length ? r(f, f(i, n.pop()), n) : i | |
// Impure and minified | |
r=(f,i,l)=>(n=[...l]).length?r(f,f(i,n.pop()),n):i | |
// Pure | |
reduce = (reducerFunction, initialValue, enumerable) => | |
enumerable.length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="foo" | |
id="bar" | |
data-info="foobar" | |
aria-hidden="true" | |
role="button"> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function containerQuery(selector, test, stylesheet) { | |
var tag = document.querySelectorAll(selector) | |
var style = '' | |
var count = 0 | |
for (var i=0; i<tag.length; i++) { | |
var attr = (selector+test).replace(/\W+/g, '') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
if (!process.stdout.isTTY) { | |
process.stderr.write('stdout is not a terminal'); | |
process.exit(1); | |
} | |
const clearScreenSeq = '\u001b[H\u001b[2J'; | |
const clearScreenSeqLen = Buffer.byteLength(clearScreenSeq); | |
const maths = (x, y, now, tie) => { |