This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage example | |
import './global.types.ts'; | |
// Enough to be imported in a single file, closer to the app's initialisation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
COMMIT_COUNT=$(git rev-list --count HEAD) | |
COMMIT_HASH=$(git rev-parse --short HEAD) | |
echo ${COMMIT_COUNT}-${COMMIT_HASH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 8080; | |
server_name localhost; | |
root /usr/share/nginx/html; | |
index index.html; | |
location /healthz.html { | |
add_header Cache-Control "no-store, max-age=0"; # never cache | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '~scss/mixins/custom-material-theme'; | |
:host ::ng-deep { | |
// mixin to generate custom Material theme (see official docs) | |
@include custom-material-theme(); | |
*, | |
*:before, | |
*:after { | |
box-sizing: border-box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reduce the size of the executable file: | |
[profile.release] | |
lto = true | |
codegen-units = 1 | |
opt-level = "z" | |
panic = 'abort' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { merge, Observable, Subject } from 'rxjs'; | |
import { debounceTime, map } from 'rxjs/operators'; | |
// Emit `true` on any source emission, then emit `false` after period of inactivity | |
const turnOffAfter = (timeout: number) => (source: Observable<any>) => merge( | |
source.pipe(map(_ => true)), // map original value to `true` | |
source.pipe(debounceTime(timeout), map(_ => false)), // emit `false` after timeout | |
); | |
// Example usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq -n \ | |
'env | |
| to_entries | |
| map(select(.key | startswith("WEB_APP_"))) | |
| map({ | |
"key": (.key | sub("WEB_APP_"; "")), | |
"value": ( | |
if (.value | test("^true$"; "i")) then true | |
elif (.value | test("^false$"; "i")) then false | |
elif (.value | test("[[:digit:]]+")) then (.value | tonumber) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq -n 'env | to_entries | map(select(.key | startswith("MY_PREFIX_"))) | from_entries' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input:focus::-webkit-input-placeholder { color:transparent; } | |
input:focus:-moz-placeholder { color:transparent; } /* FF 4-18 */ | |
input:focus::-moz-placeholder { color:transparent; } /* FF 19+ */ | |
input:focus:-ms-input-placeholder { color:transparent; } /* IE 10+ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var gulp = require('gulp'); | |
var $ = require('gulp-load-plugins')(); | |
var source = require('vinyl-source-stream'); | |
var babelify = require('babelify'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var dependencies = [ |
NewerOlder