Skip to content

Instantly share code, notes, and snippets.

View intellix's full-sized avatar

D intellix

View GitHub Profile
@intellix
intellix / iban.validator.ts
Last active February 8, 2022 11:19
IBAN Validation in Angular
const codeLengths: { [code: string]: number } = {
AD: 24,
AE: 23,
AL: 28,
AT: 20,
AZ: 28,
BA: 20,
BE: 16,
BG: 22,
BH: 22,
@intellix
intellix / input.scss
Created August 18, 2021 19:02
Generated by SassMeister.com.
// [_ngcontent_123] is automatically wrapped due to default ViewEncapsulation.Emulated
[_ngcontent_123] {
.layout {
display: flex;
.item {
flex: 1;
.name {
@intellix
intellix / input.scss
Created August 18, 2021 19:01
Generated by SassMeister.com.
[_ngcontent_123] {
.layout {
display: flex;
.item {
flex: 1;
.name {
text-align: left;
@intellix
intellix / test.module.ts
Created January 9, 2018 21:30
1x cmp (1.3kb) vs 2x cmp (1.9kb)
webpackJsonp(["test.module"],{l6mg:function(n,l,o){"use strict";function e(n){return u["\u0275vid"](0,[(n()(),u["\u0275eld"](0,0,null,null,1,"p",[],null,null,null,null,null)),(n()(),u["\u0275ted"](-1,null,["\n one works!\n"])),(n()(),u["\u0275ted"](-1,null,["\n"]))],null,null)}Object.defineProperty(l,"__esModule",{value:!0});var u=o("LMZF"),t=function(){},c=function(){function n(){}return n.prototype.ngOnInit=function(){},n}(),r=u["\u0275crt"]({encapsulation:0,styles:[[""]],data:{}}),d=u["\u0275ccf"]("cw-one",c,function(n){return u["\u0275vid"](0,[(n()(),u["\u0275eld"](0,0,null,null,1,"cw-one",[],null,null,null,e,r)),u["\u0275did"](1,114688,null,0,c,[],null,null)],function(n,l){n(l,1,0)},null)},{},{},[]),i=o("Un6q");o.d(l,"TestModuleNgFactory",function(){return a});var a=u["\u0275cmf"](t,[c],function(n){return u["\u0275mod"]([u["\u0275mpd"](512,u.ComponentFactoryResolver,u["\u0275CodegenComponentFactoryResolver"],[[8,[d]],[3,u.ComponentFactoryResolver],u.NgModuleRef]),u["\u0275mpd"](4608,i.NgLocalization,i.N
@intellix
intellix / summary-1.component.ts
Created January 9, 2018 19:48
Heap size differences
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Apollo } from 'apollo-angular';
import { Observable } from 'rxjs/Observable';
import { map, pluck, switchMap } from 'rxjs/operators';
import { query, User, SummaryResponse } from './summary.graphql';
@Component({
selector: 'cw-summary',
{
"_args": [
[
{
"raw": "apollo-client@^0.5.9",
"scope": null,
"escapedName": "apollo-client",
"name": "apollo-client",
"rawSpec": "^0.5.9",
"spec": ">=0.5.9 <0.6.0",
(function() {
'use strict';
angular
.module('chunkFilter')
.filter('chunk', chunk);
function chunk() {
return function(value, size, vertical, preserveKeys) {
var chunks = [];
(function() {
'use strict';
angular
.module('chunkFilter')
.filter('chunk', chunk);
function chunk() {
return function(value, size, vertical, preserveKeys) {
var chunks = [];
@intellix
intellix / SassMeister-input.scss
Created February 25, 2016 14:37
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$var: red;
$var: #000 !default;
p {
color: $var;
}
@intellix
intellix / SassMeister-input.scss
Created February 24, 2016 16:41
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
#promotions,
#promotions-archive {
.expand-view-banner {
background-color: red;
min-height: 17px;
position: relative;