This file contains 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
type CSVRow<T> = Record<keyof T, string | number>; | |
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
class CSVParser<T = any> { | |
private rows: CSVRow<T>[]; | |
private header: (keyof T)[]; | |
constructor(csvData: string) { | |
this.rows = this.parseCSV(csvData); | |
this.header = this.rows.length > 0 ? (Object.keys(this.rows[0]) as (keyof T)[]) : []; |
This file contains 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
grunt - build - control | |
/*! | |
* Bootstrap's Gruntfile | |
* http://getbootstrap.com | |
* Copyright 2013-2015 Twitter, Inc. | |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
*/ | |
module.exports = function (grunt) { | |
'use strict'; |
This file contains 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
module.exports = function (grunt) { | |
"use strict"; | |
// requirements | |
var fs = require('fs'); | |
var glob = require("glob"); | |
var argv = require('yargs').argv; | |
var mkdirp = require('mkdirp'); |
This file contains 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
Show hidden characters
[ | |
{ | |
"class": "label_control", | |
"color": [255, 255, 255], | |
"shadow_color": [24, 24, 24], | |
"shadow_offset": [0, -1] | |
}, | |
{ | |
"class": "button_control", | |
"content_margin": [6, 5, 6, 6], |
This file contains 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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
This file contains 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
// Clamps a block of text to a certain number of lines, | |
// followed by an ellipsis in Webkit and Blink based browsers | |
// Reference: http://dropshado.ws/post/1015351370/webkit-line-clamp | |
@mixin text-clamp($lines: 2, $line-height: false) { | |
overflow: hidden; | |
display: -webkit-box; | |
-webkit-box-orient: vertical; | |
-webkit-line-clamp: $lines; | |
// Fallback for non-Webkit browsers |
This file contains 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
/* | |
* http://christian-fei.com/tutorials/how-to-lazy-load-disqus-comments/ | |
* | |
* <div class="comments"></div> | |
*/ | |
var comments = document.getElementsByClassName('comments')[0], | |
disqusLoaded = false; | |
function loadDisqus() { |