Skip to content

Instantly share code, notes, and snippets.

View kiritAyya's full-sized avatar
💤

Kirit Ayya kiritAyya

💤
  • FinBox
  • India, Goa
View GitHub Profile
@arniebradfo
arniebradfo / any.component.html
Last active May 16, 2023 18:05
Angular *ngFor recursive list tree template
<h1>Angular 2 Recursive List</h1>
<ul>
<ng-template #recursiveList let-list>
<li *ngFor="let item of list">
{{item.title}}
<ul *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
</ul>
</li>
</ng-template>
@slok
slok / main.go
Created June 12, 2016 10:09
handler & handlerfunc golang pattern example
// Package main is an example of how handler pattern works in golang.
//
// At first you will need some sort of start point. To do this we create
// ExampleHandler interface, this interface has a trigger method that will
// execute the chain, in his case is RunExample, it accepts a writer, and a
// custom input object, as you see there is an out and an in parameter.
//
// We could work like this you can create multiple ExampleHandlers in a helper
// function and call them on in another. But this is not very handy and it smells
//
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@mattes
mattes / check.go
Last active April 4, 2024 22:40
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}