Skip to content

Instantly share code, notes, and snippets.

Avatar
🤹‍♂️
hardly working

Jeff Delaney codediodeio

🤹‍♂️
hardly working
View GitHub Profile
@codediodeio
codediodeio / config.js
Last active Jan 16, 2021
Snippets from the Firestore Data Modeling Course
View config.js
import * as firebase from 'firebase/app';
import 'firebase/firestore';
var firebaseConfig = {
// your firebase credentials
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.0/lodash.min.js"></script>
<style>
body {
text-align: center;
display: flex;
@jdjuan
jdjuan / meta-regimen.md
Last active Jun 15, 2018
Meta Regimen: How to stick to your habits
View meta-regimen.md

Meta Regimen

Lessons I've learned throughout the years to keep up with my habits.

1. Motivate Yourself 💪

Nothing will make you skip your habits more than the lack of motivation

  • Believe you can
  • Watch motivational videos
View angular-interview-questions.md

Angular Interview Questions

Some basic questions going from easy to difficult. A more exhaustive list of more questions from the community can be found here.

Easy

  • Whats the difference between components and directives? [ANSWER]: Components are widgets while directives more like decorators for elements and/or components.
  • How do you get a reference to a child component? [ANSWER]: ViewChild/ViewChildren or ContentChild/ContentChildren
  • What is the difference between ViewChild and ContentChild?
  • Whats the difference between NgModules and ES2015 Modules?
  • How do you lazy load components and why is lazy loading important?
  • Explain Observables and why they are useful.
@nclarx
nclarx / your-component.component.ts
Created Sep 28, 2017
Example of Subscribe to Property
View your-component.component.ts
import {Component, OnDestroy, OnInit} from '@angular/core';
import {User} from './user'; // Assuming you have a class for user =====
import {Subscription} from 'rxjs/Subscription';
import {AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable} from 'angularfire2/database';
@Component({
selector: 'your-component',
template: `
<h1>{{ (user | async)?.name }}</h1>
<h1>{{ (user | async)?.price }}</h1>
@codediodeio
codediodeio / content-box.component.html
Created Aug 5, 2017
Animate a div based on scroll position Angular 4.3
View content-box.component.html
<div class="box" [@scrollAnimation]="state">
<img src="https://images.pexels.com/photos/37547/suit-business-man-business-man-37547.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb">
</div>
@codediodeio
codediodeio / search-ui.component.html
Last active May 12, 2018
Algolia instantsearch.js Angular 4
View search-ui.component.html
<div id="search-box">
<!-- SearchBox widget will appear here -->
</div>
<div id="stats">
<!-- stats widget will appear here -->
</div>
<div id="hits">
<!-- Hits widget will appear here -->
</div>
<div id="pagination">
@staltz
staltz / introrx.md
Last active Jan 21, 2021
The introduction to Reactive Programming you've been missing
View introrx.md
@jed
jed / LICENSE.txt
Created May 20, 2011 — forked from 140bytes/LICENSE.txt
generate random UUIDs
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
You can’t perform that action at this time.