Skip to content

Instantly share code, notes, and snippets.

View Kamilnaja's full-sized avatar
💭
🐍🔥

Kamil Naja Kamilnaja

💭
🐍🔥
View GitHub Profile
@Kamilnaja
Kamilnaja / Fiter items by name ANG2.ts
Last active May 6, 2017 11:27
Filter items by the name. Based on Net Ninja Tutorial
//inside template
<label>Filtruj po rasie</label>
<input type="text" name="filter" [(ngModel)]="term"/>
</form>
<div
*ngFor="let dog of dogs | filter:term;
let i = index"
class="puppy-wrapper"
(click)="onSelect(dog)"
@gregarendse
gregarendse / Testing An Angular CLI Project in a Headless Environment.md
Last active May 20, 2019 03:51
Testing An Angular CLI Project in a Headless Environment

Testing An Angular CLI Project in a Headless Environment

I recently started a new project and we used [Angular CLI][4] to get started. Angular CLI, as in the name, is a command line utility for creating and managing Angular 2 projects. Using Angular CLI to create a project is very easy and it gives you a great starting point for new Angular 2 projects. The only draw back I found was that in my mind it wasn't CI ready.

Angular CLI out of the box gives you a few unit tests and an end to end (e2e) test. This is great because you can generate a project and set up your build server to build the artefacts. This is where I ran into problems.

Having everything generated for you is great until something you want to do does not work; and this is where I was. I wanted to build and test my angular application on a headless build agent. The generated code from Angular CLI runs tests using Google Chrome by default. Which is fine, but running Google Chrome on a bui

@rjmunro
rjmunro / index.ts
Last active January 9, 2023 16:12
Typescript weirdness
var a = require('./module1');
var b = require('./module2');
// import a from './module1';
// import b from './module2';
console.log('a',a);
console.log('b',b);
@scabbiaza
scabbiaza / typography.less
Last active July 15, 2023 15:22
Typography. Vertical Rhythm.
// How it works: https://youtu.be/IbfsvI6dh4U
@textFontSize: 20px;
@lineHeight: 1.5rem;
// Set up font size and line-height
html {
font-size: @textFontSize;
}
@danwit
danwit / passport_node_acl_example.js
Created May 1, 2014 23:23
Authentication and authorization with passportjs + node_acl + mongo + express
/**
* Simple authentication and authorization example with passport, node_acl,
* MongoDB and expressjs
*
* The example shown here uses local userdata and sessions to remember a
* logged in user. Roles are persistent all the way and applied to user
* after logging in.
*
* Usage:
* 1. Start this as server