Skip to content

Instantly share code, notes, and snippets.

View tommydunn's full-sized avatar
🖖

Tommy Dunn tommydunn

🖖
View GitHub Profile
@tommydunn
tommydunn / converter.php
Created March 22, 2021 02:13 — forked from ChrisButterworth/converter.php
Webp converter for WordPress
<?php
namespace Converter;
use WebPConvert\WebPConvert;
class Converter
{
public $lazy = false;
public function __construct($lazy = false)
@tommydunn
tommydunn / ttf2woff2.md
Created January 8, 2021 17:07 — forked from sergejmueller/ttf2woff2.md
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@tommydunn
tommydunn / 0.html
Created September 9, 2020 00:35 — forked from jhades/0.html
Angular Component Styling Guide
<p>A Bootstrap Primary Button:</p>
<button class="btn btn-primary">Button</button>
@tommydunn
tommydunn / font-stacks.css
Created August 10, 2020 18:55 — forked from don1138/font-stacks.css
CSS Modern Font Stacks
/* Modern Font Stacks */
/* System */
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* A modern Georgia-based serif */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
@tommydunn
tommydunn / drawing-board.component.ts
Created July 3, 2020 18:27 — forked from anupkrbid/drawing-board.component.ts
A example canvas component for drawing in an angular 6 app using rxjs 6.
import {
AfterViewInit,
Component,
ElementRef,
Input,
OnDestroy,
ViewChild
} from '@angular/core';
import { fromEvent } from 'rxjs';
import { pairwise, switchMap, takeUntil } from 'rxjs/operators';
@tommydunn
tommydunn / some.component.ts
Last active May 19, 2020 02:24
toggle selected item inside ngFor in angular
product: Product;
selectedProduct: product;
onSelect(product: Product) {
this.selectedProduct = product;
}
# in your html
@tommydunn
tommydunn / custom-scrollbars-mixin.scss
Created April 14, 2020 14:21
Custom Scrollbars Mixin
@mixin scrollbars($size, $foreground-color, $background-color: mix($foreground-color, white, 50%)) {
// For Google Chrome
&::-webkit-scrollbar {
width: $size;
height: $size;
}
&::-webkit-scrollbar-thumb {
background: $foreground-color;
}
@tommydunn
tommydunn / any.component.ts
Last active March 15, 2020 16:02
Angular GSAP workflow (created goes to R.Lloyd - https://greensock.com/forums/topic/22403-angular-8-gsap/)
import { Component, OnInit } from '@angular/core';;
import { GsapService } from 'src/services/gsap.service';
@Component({
selector: 'app-any',
templateUrl: './any.component.html',
styleUrls: ['./any.component.scss']
})
export class AnyComponent implements OnInit {
@tommydunn
tommydunn / menu.component.html
Last active January 20, 2020 18:21
Example Angular Link
<!-- see https://angular.io/guide/router for more info -->
<a routerLink="/home" routerLinkActive="menu--is-active" data-item="Home" role="menuitem" class="item--link">Home</a>