Skip to content

Instantly share code, notes, and snippets.

View KubikPixel's full-sized avatar
:octocat:
on work

KubikPixel KubikPixel

:octocat:
on work
View GitHub Profile
@alexzuza
alexzuza / lazy-load-script.service.ts
Created October 30, 2018 15:42
Load script on demand
import { Injectable, Inject } from '@angular/core';
import { ReplaySubject, Observable } from 'rxjs';
import { DOCUMENT } from '@angular/common';
@Injectable()
export class LazyLoadingScriptService {
_loadedLibraries: { [url: string]: ReplaySubject<any> } = {};
constructor(@Inject(DOCUMENT) private readonly document: any) { }
@lwakefield
lwakefield / tabcomplete.vim
Last active January 23, 2018 21:12
tabcomplete
inoremap <expr> <tab> pumvisible() ? '<c-n>' : '<tab>'
inoremap <expr> <s-tab> pumvisible() ? '<c-p>' : '<tab>'
augroup autocomplete
autocmd!
autocmd TextChangedI * call TypeComplete()
augroup end
fun! TypeComplete()
if getline('.')[col('.') - 2] =~ '\K' && getline('.')[col('.') - 1] !~ '\K'
call feedkeys("\<c-n>")
end