Skip to content

Instantly share code, notes, and snippets.

View leon's full-sized avatar

Leon Radley leon

View GitHub Profile
@leon
leon / auth.state.ts
Created April 1, 2018 17:55
NGXS auth state
import { Router } from '@angular/router';
import { Action, Selector, State, StateContext, Store } from '@ngxs/store';
import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase from 'firebase';
import { take, tap } from 'rxjs/operators';
import {
CheckSession,
LoginWithFacebook,
@leon
leon / test.yml
Created March 1, 2020 17:51
Nrwl NX github actions
name: Test develop and feature branches
on:
push:
branches:
- develop
- "feature/*"
jobs:
test:
@leon
leon / README.md
Last active April 21, 2023 07:04
NX tailwind 3 setup

Tailwind 3 has jit mode and purge built in.

So we only need to specify a list of globs to the content prop of the tailwind.config.js

@nrwl/workspace contains a function called createGlobPatternsForDependencies which can generate an array of globs that you can pass to tailwind.

@leon
leon / CompareTools.plist
Created August 17, 2022 12:32
GitTower VSCode as diff and merge tool - Juli 2022 Edition
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>ApplicationIdentifier</key>
<string>com.microsoft.VSCode</string>
<key>ApplicationName</key>
<string>Visual Studio Code</string>
<key>DisplayName</key>
@leon
leon / convert-hrd-to-dds.sh
Created February 16, 2023 16:24
Convert .hdr to .dds
#!/bin/bash
echo "Converting HDR"
# https://github.com/dariomanesku/cmft
SCRIPT_DIR=${0%/*}
HDR_FILE=${1%%.*}
# 8bits 128x128
@leon
leon / my.component.txt
Created March 15, 2023 08:10
Angular Wrap Forms component
Template driven forms:
viewProviders: [
{ provide: ControlContainer, useExisting: NgForm }
]
Reactive
viewProviders: [
{ provide: ControlContainer, useExisting: FormGroupDirective }
]