Skip to content

Instantly share code, notes, and snippets.

View dannypule's full-sized avatar
🎯
Focusing

Danny Pule dannypule

🎯
Focusing
View GitHub Profile
@dannypule
dannypule / cssNamedColors.csv
Last active June 18, 2022 09:19
CSS Named Colors
Specification Keyword RGB hex value
CSS Level 1 black #000000
CSS Level 1 silver #c0c0c0
CSS Level 1 gray #808080
CSS Level 1 white #ffffff
CSS Level 1 maroon #800000
CSS Level 1 red #ff0000
CSS Level 1 purple #800080
CSS Level 1 fuchsia #ff00ff
CSS Level 1 magenta #ff00ff
@dannypule
dannypule / json_to_csv.js
Created February 8, 2017 18:40
Export JSON to CSV file using Javascript
function convertToCSV(objArray) {
var array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray;
var str = '';
for (var i = 0; i < array.length; i++) {
var line = '';
for (var index in array[i]) {
if (line != '') line += ','
line += array[i][index];
@Directive({ selector: '[my-tooltip]' })
export class TooltipDirective implements OnDestroy {
@Input() tooltipTitle: string = '';
private id: string;
constructor(private tooltipService: TooltipService, private element: ElementRef) { }
@HostListener('mouseenter')
onMouseEnter(): void {
app_b95b26e6f55b3ce20310.js
assets.json
index.html
polyfills_b95b26e6f55b3ce20310.js
vendor_b95b26e6f55b3ce20310.js
{
"app": {
"js": "/app_b95b26e6f55b3ce20310.js"
},
"polyfills": {
"js": "/polyfills_b95b26e6f55b3ce20310.js"
},
"vendor": {
"js": "/vendor_b95b26e6f55b3ce20310.js"
}
...
declare var window: any;
window.POLYFILLS_JS_LOADED = true;
...
declare var window: any;
window.VENDOR_JS_LOADED = true;
var AssetsPlugin = require('assets-webpack-plugin');
...
output: {
path: helpers.root('dist'), // sets output folder to 'dist'
publicPath: '/', // tells webpack where we'll host the generated bundle
filename: '[name]_[hash].js', // output filename - e.g app.js or vendor.js
chunkFilename: '[id].chunk.js' //??
},
<script>
console.log('APP_ENVIRONMENT: ' + APP_ENVIRONMENT);
switch (APP_ENVIRONMENT) {
case 'DEVELOPMENT':
document.getElementById("polyfills_js").src = 'http://localhost:8085/polyfills.js';
var vendorJsInterval = setInterval(function () {
if (window.POLYFILLS_JS_LOADED) {
document.getElementById("vendor_js").src = 'http://localhost:8085/vendor.js';
<script id="polyfills_js" type="text/javascript"></script>
<script id="vendor_js" type="text/javascript"></script>
<script id="app_js" type="text/javascript"></script>