Skip to content

Instantly share code, notes, and snippets.

View cosemansp's full-sized avatar

Peter Cosemans cosemansp

  • Euricom
  • Belgium
View GitHub Profile
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: '"SourceCodePro+Powerline+Awesome Regular","Roboto Mono for Powerline", "Meslo LG L DZ for Powerline", "Source Code Pro for Powerline", Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
<div class="alert alert-success">
<strong>Success!</strong> Success message</a>.
</div>
<div class="alert alert-info">
<strong>Info!</strong> Alert message</a>.
</div>
<div class="alert alert-warning">
<strong>Warning!</strong> Warning message</a>.
</div>
<div class="alert alert-danger">
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
// create a platform
let platform = platformBrowserDynamic();
// save reference to the global object
window['rootInjector'] = platform.injector;
// boostrap application
platform.bootstrapModule(AppModule);
@cosemansp
cosemansp / Angular Workshop - Xerius
Last active April 27, 2017 11:56
Angular Workshop - Xerius
/* style.css */
.flex-grid {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.col {
width: 32%;
}
import { Subject, Observable } from 'rxjs';
class EventAggregator {
constructor() {
this.subject = new Subject(); // Can be ReplaySubject too
}
publish(type, data) {
this.subject.onNext({ type, data });
}
@cosemansp
cosemansp / Typescript for ES6 developers
Last active May 20, 2016 05:50
Typescript for ES6 developers
# Default import from commonJS module
## ES6
import chai, { expect } from 'chai';
import chaiAsPromised from 'chai-as-promised';
chai.use(chaiAsPromised);
## Typescript
// beta.15
import { NgZone } from 'angular2/core';
constructor(nav, navParams, apiServer) {
this.zone = new NgZone({ enableLongStackTrace: false });
}
method() {
this.zone.run(() => {
@cosemansp
cosemansp / .eslintrc.json
Created April 17, 2016 10:44 — forked from egamma/.eslintrc.json
Visual Studio Code default .eslintrc.json
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
@cosemansp
cosemansp / .eslintrc
Created April 17, 2016 10:35 — forked from dermike/.eslintrc
eslint
{
"env": {
"browser": true,
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,

@Input / @Output

@Component({
	selector: 'ng2-markdown',
	inputs: [ 'source' ],
	outputs: [ 'modified' ]
})

export class MyComponent {

constructor () {