Skip to content

Instantly share code, notes, and snippets.

View rafszul's full-sized avatar

rafal szulczewski rafszul

View GitHub Profile
@rafszul
rafszul / 1. highcharts.component.ts
Created March 22, 2018 16:03 — forked from fabiobiondi/1. highcharts.component.ts
Simple HighChart component in Angular 5
import { AfterViewInit, Component, ElementRef, Input, OnChanges, SimpleChanges, ViewChild } from '@angular/core';
import { HighChartService } from './highchart.service';
@Component({
selector: 'fb-highchart',
template: '<div *ngIf="config"></div>',
providers: [HighChartService]
})
export class HighChartComponent implements OnChanges, AfterViewInit {
@Input() config: any;

// to generate documentation with copmpodoc

npm install -g @compodoc/compodoc npm install --save-dev @compodoc/compodoc

add in package.json

"scripts": {
 "compodoc": "./node_modules/.bin/compodoc -p tsconfig.json"

##Fixing npm permissions

You may receive an EACCES error when you try to install a package globally. This indicates that you do not have permission to write to the directories that npm uses to store global packages and commands.

You can fix this problem using one of three options:

Change the permission to npm's default directory. Change npm's default directory to another directory. Install Node with a package manager that takes care of this for you. You should back-up your computer before moving forward.

ng g component **name** --flat --module=app

--flat puts the file in src/app instead of its own folder. --module=app tells the CLI to register it in the imports array of the AppModule.

@rafszul
rafszul / frameworks-js-css.md
Last active November 16, 2017 12:22
frameworks js css
@rafszul
rafszul / Covalent.md
Last active November 16, 2017 10:32
rationale for angular, material design and set of ui components by covalent

#Covalent

Covalent is a UI Platform that combines proven design language with a comprehensive web framework, built on Angular & Angular-Material (Design). Covalent gives you a quickstart to build a modern web application UI and ensure consistency across your enterprise products. Some of Covalent's most important features include:

  • Angular-Material
  • Angular Command-line interface (CLI) for builds, deploys, testing & more.
  • Drastically simplified interface layouts (for dashboards, lists, etc).
  • Custom web components (stepper, file upload, expansion panels & more).
  • 750+ Material Design icons.
  • Style Guide with brand standards, color palettes & tips.
  • Design Patterns for consistent, reusable web components such as cards, forms, etc.
@namespace url(http://www.w3.org/1999/xhtml);
@namespace svg url(http://www.w3.org/2000/svg);
/* This matches all XHTML <a> elements, as XHTML is the default unprefixed namespace */
a {}
/* This matches all SVG <a> elements */
svg|a {}
/* This matches both XHTML and SVG <a> elements */
Sketch JSON Parser
=================
#### Replaces layer values in groups with JSON data
### Setup
1. Download/Clone this repo
2. Run json-parser.sketchplugin
### Example
#####1. Say you have a group that looks like this: