Skip to content

Instantly share code, notes, and snippets.

View DotCoyote's full-sized avatar

Lars DotCoyote

  • Turbine Kreuzberg GmbH
  • Leipzig, Germany
View GitHub Profile
@DotCoyote
DotCoyote / api.types.ts
Created February 20, 2019 07:43
Api Types
import { AxiosRequestConfig, AxiosResponse } from 'axios'
export class ApiResponse implements AxiosResponse {
data: any
status: number
statusText: string
headers: any
config: AxiosRequestConfig
}
@DotCoyote
DotCoyote / api.ts
Created February 20, 2019 07:41
Example Axios API Class
import axios, { AxiosPromise, AxiosRequestConfig } from 'axios'
import { URL } from 'consts'
import { ApiResponse } from '__src/types/api'
const cancelTokens = {}
// ====================================
// Interceptors
// ====================================
axios.interceptors.request.use((requestConfig: AxiosRequestConfig) => {
@DotCoyote
DotCoyote / 0_reuse_code.js
Created January 20, 2017 06:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@DotCoyote
DotCoyote / header.html
Created September 29, 2016 10:38
Atomic BEM Header Example
<!-- Header Bar -->
<header class="e-header">
<!-- Header Top -->
<div class="e-header__top">
<!-- Logo -->
<a href="index.html" class="e-header__logo">
<img src="img/logo.svg" alt="companyLogo">
</a>
@DotCoyote
DotCoyote / index.html
Created September 29, 2016 09:54
Atomic BEM Starting Point
<!DOCTYPE html>
<html class="no-js" lang="de">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Atomic BEM</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">