Skip to content

Instantly share code, notes, and snippets.

View michaeldoye's full-sized avatar

Michael Doye michaeldoye

View GitHub Profile
@michaeldoye
michaeldoye / add_component.sh
Last active November 18, 2019 12:43
Bash script to add Functional TypeScript React Component with SCSS and Unit Test
#!/bin/bash
# run mv add_component.sh /usr/local/bin
# Creates boilerplate for Functional TypeScript React Component
mkdir $1
cd $1
touch $1.tsx
touch $1.scss
touch $1.spec.tsx
import { Injectable } from '@angular/core';
import { SwUpdate } from '@angular/service-worker';
import { interval } from 'rxjs';
import { MatSnackBar } from '@angular/material';
@Injectable()
export class WorkerService {
constructor(public updates: SwUpdate, public snackBar: MatSnackBar) {
// If updates are enabled
@rveitch
rveitch / sass-7-1-pattern.scss
Last active June 24, 2024 12:21
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel