Skip to content

Instantly share code, notes, and snippets.

Elmar Putz elmarputz

  • Studio Mitte Digital Media GmbH
  • Linz, Austria
Block or report user

Report or block elmarputz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:4d65a7384ad8d531326cfd97d7c3dde2
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" date="2013-09-08T21:34:32Z" product-name="myproduct">
<trans-unit id="contact.header">
<trans-unit id="contact.text">
View gist:af53cc7ac8be8567183ef0e15cc65272
<f:if condition="{languageNavigation}">
<ul id="language" class="language-menu">
<f:for each="{languageNavigation}" as="item">
<li class="{f:if(condition:, then: 'active')}{f:if(condition: item.available, else: ' text-muted')}">
<f:if condition="{item.available}">
<a href="{}" hreflang="{item.hreflang}" title="{item.navigationTitle}">
View page.config.typoscript
config {
debug = 1
doctype = html5
htmlTag_setParams = none
htmlTag_stdWrap {
setContentToCurrent = 1
cObject = COA
View interceptor
import {Injectable} from "@angular/core";
import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/common/http";
import {Observable} from 'rxjs';
export class TokenInterceptorService implements HttpInterceptor {
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
request = request.clone({
View auth service
import {Injectable} from '@angular/core';
import {isNullOrUndefined} from "util";
import {HttpClient} from "@angular/common/http";
import * as decode from 'jwt-decode';
import {retry} from 'rxjs/operators';
//npm install --save-dev jwt-decode
interface User {
result: {
View login
<div *ngIf="!isLoggedIn()">
<form class="ui large form" [formGroup]="loginForm" (ngSubmit)="login()">
<div class="field">
<input type="email" id="username" formControlName="username">
<div *ngIf="loginForm.get('username').invalid &&
(loginForm.get('username').dirty || loginForm.get('username').touched) &&
loginForm.get('username').hasError('required')" class="ui negative message">
View gist:daace6e4f48cfa7c30d2fced9ba9f2d1
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.0.0",
"barryvdh/laravel-cors": "^0.11.3",
"fideloper/proxy": "~3.3",
View gist:f35e76efbfff385f737b93abc511f645
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use JWTAuth;
use JWTAuthException;
use App\User;
class ApiAuthController extends Controller
View gist:f006397aac64bf591b05a77e521b5c22
export class ErrorMessage {
public forControl: string,
public forValidator: string,
public text: string
) { }
export const BookFormErrorMessages = [
new ErrorMessage('title', 'required', 'Ein Buchtitel muss angegeben werden'),
new ErrorMessage('isbn', 'required', 'Es muss eine ISBN angegeben werden'),
View bookform.ts
import { ActivatedRoute, Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, FormArray, Validators } from '@angular/forms';
import { BookFormErrorMessages } from './book-form-error-messages';
import {BookFactory} from "../shared/book-factory";
import {BookStoreService} from "../shared/book-store.service";
import {Book, Image} from "../shared/book";
You can’t perform that action at this time.