Skip to content

Instantly share code, notes, and snippets.

View jarodsmk's full-sized avatar
🎸
Feeling djent-y

jarodsmk

🎸
Feeling djent-y
View GitHub Profile
@jarodsmk
jarodsmk / MultiTranslateHttpLoader.ts
Last active March 5, 2018 08:31 — forked from BorisWechselberger/MultiTranslateHttpLoader.ts
TranslateLoader for multiple JSON files
import {HttpClient} from '@angular/common/http';
import {TranslateLoader} from '@ngx-translate/core';
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/observable/forkJoin';
export function translateLoader(http: HttpClient) {
return new MultiTranslateHttpLoader(http, [
{prefix: './assets/i18n/', suffix: '.json'},
{prefix: './assets/i18n/countries-', suffix: '.json'}
@jarodsmk
jarodsmk / pre-commit
Last active September 30, 2021 03:44 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit, detects merge markers, and prettifies your code!
#!/bin/sh
# ------------------------------------------------------------------------------------#
# Console log check
# ------------------------------------------------------------------------------------#
# Redirect output to stderr.
exec 1>&2
# Enable user input
exec < /dev/tty
# Updated regexp to only look at the addition of console.log's on the current branch HEAD