Skip to content

Instantly share code, notes, and snippets.

View lindakatcodes's full-sized avatar

Linda Thompson lindakatcodes

View GitHub Profile
@lindakatcodes
lindakatcodes / til.md
Last active November 9, 2021 01:11
TIL

Today I Learned

10/7 Thurs - Angular's @Output will automatically subscribe to an observable if it's passed directly to it! Because EventEmitter is a Subject under the hood, it can detect if it's using an observable and will subscribe to it for you. Skips an extra function just to send the value!


10/11 Mon - The if/else syntax in Angular always throws me - the else goes into a ng-template tag, and the conditions aren't listed in the standard JavaScript way. For future reference:

<div *ngIf="condition; else elseBlock">...</div>
<ng-template #elseBlock>...</ng-template>
@lindakatcodes
lindakatcodes / index.html
Created May 27, 2021 19:56
CSS Combinators - Adjacent and General Siblings
<div class="parent">
<h2>I'm an h2!</h2>
<!-- This is an adjacent sibling - it's the first p directly after the h2 -->
<p>I sit right next to the h2!</p>
<!-- Here it's after the h2 but not directly next, so is a general sibling -->
<p>I'm related to h2, but farther away.</p>
</div>
@lindakatcodes
lindakatcodes / index.html
Created May 27, 2021 19:55
CSS Combinators - Descendant and Child
<div class="parent">
<!-- This is a direct child of parent -->
<span>
I'm a child of parent!
</span>
<p>
I'm a paragraph
<!-- This is nested deeper, so is a descendant but not a direct child -->
<span>
with a span inside!
@lindakatcodes
lindakatcodes / starship.toml
Created November 17, 2020 23:48
My current startship setup file. Will need to use a Nerd Font family to be able to read the icons stored in the comments.
[character]
error_symbol = "[✘ ](bold red)"
format = "[ ](bold cyan)"
success_symbol = "[✔ ](bold green)"
#     ﯟ  器 ﮼        
# holidays -  ﮊ 滑    ﴔ 
[directory]
truncation_length = 2
@lindakatcodes
lindakatcodes / Login.vue
Created June 11, 2020 18:41
Login page and firebase config for DIOT
<template>
<div id="auth-container"></div>
</template>
<script>
import { ui, uiConfig } from '../../firebaseConfig';
export default {
mounted() {
ui.start('#auth-container', uiConfig);
@lindakatcodes
lindakatcodes / gulpfile-p2.js
Created June 2, 2018 16:46
Udacity Mobile Web Specialist Responsive Images Project - my gulp file for getting images resized, compressed, and cropped
var gulp = require('gulp');
var imageMin = require('gulp-imagemin');
var resize = require('gulp-image-resize');
var rename = require('gulp-rename');
var del = require('del');
// Outside of the above required plugins, you'll also need to download either GraphicsMagick or ImageMagick. The links are on the quiz page. I chose to use GraphicsMagick, but either will work. Just download the installer file for your OS, and let it install. You won't need it to show in any code, it just has to be on your computer.
// Clean will remove the images folder, if it already exists, so we don't risk getting any duplicate folders
@lindakatcodes
lindakatcodes / gulpfile.js
Last active February 27, 2019 15:48
Gulp File for Optimizing Images - MWS Google Udacity Nanodegree
var gulp = require('gulp');
var imageMin = require('gulp-imagemin');
var resize = require('gulp-image-resize');
var rename = require('gulp-rename');
var del = require('del');
// Outside of the above required plugins, you'll also need to download either GraphicsMagick or ImageMagick. The links are on the quiz page. I chose to use GraphicsMagick, but either will work. Just download the installer file for your OS, and let it install. You won't need it to show in any code, it just has to be on your computer.
// Clean will remove the images folder, if it already exists, so we don't risk getting any duplicate folders
// For larger projects, should update / change this to something that instead watches for new / changed files and updates those, instead of deleting the folder and completely redoing it