Skip to content

Instantly share code, notes, and snippets.

View VaLeXaR's full-sized avatar

Valentyn Riaboshtan VaLeXaR

View GitHub Profile
@VaLeXaR
VaLeXaR / date-fns-date-adapter.ts
Last active April 2, 2020 11:05 — forked from JoniJnm/date-fns-date-adapter.ts
date-fns angular material adapter #tags: Angular
import { Injectable } from '@angular/core';
import { DateAdapter } from '@angular/material/core';
import {
addDays,
addMonths,
addYears,
format,
getDate,
getDaysInMonth,
getMonth,
@VaLeXaR
VaLeXaR / embedded-file-viewer.md
Last active December 3, 2019 15:28 — forked from tzmartin/embedded-file-viewer.md
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@VaLeXaR
VaLeXaR / tpl.html
Last active February 19, 2020 18:31 — forked from alexzuza/with-loading.pipe.ts
With loading pipe long living stream #tags: Angular
<h2 class="title">Products</h2>
<div class="search-bar">
<input (input)="searchStream$.next($event.target.value)">
</div>
<div class="results">
<h3>Built-in solution</h3>
<div *ngIf="obs$ | async as obs">
<ng-template [ngIf]="obs.type === 'finish'">
@VaLeXaR
VaLeXaR / quill-editor.component.ts
Last active April 3, 2019 08:23 — forked from changhuixu/quill-editor.component.ts
Lazy Load External JavaScript Library in Angular #tags: Angular
declare var Quill: any;
@Component({
//...
})
export class QuillEditorComponent implements OnInit {
constructor(
// ...
private readonly svc: QuillEditorService,
@VaLeXaR
VaLeXaR / commands
Last active December 17, 2022 21:53
Angular CLI CheatSheet #tags: Angular
npm install -g @angular/cli
ng new <project name>
cd <project name>
ng serve
ng update @angular/cli @angular/core
@VaLeXaR
VaLeXaR / git-pull-all
Created August 3, 2018 14:11 — forked from grimzy/git-pull-all
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@VaLeXaR
VaLeXaR / text.sh
Last active December 2, 2020 15:57
Angular Development #tags: Angular
NodeJS - https://nodejs.org/en/
# npm i webpack webpack-dev-server typescript -g
choco install nodejs.install
# choco upgrade nodejs.install
# choco install microsoft-build-tools
npm i windows-build-tools -g
npm i @angular/cli -g
npm i typescript -g
npm i nx -g
@VaLeXaR
VaLeXaR / SSL-certs-OSX.md
Created April 3, 2018 18:59 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@VaLeXaR
VaLeXaR / not-so-super-admins.php
Created July 5, 2017 09:09 — forked from soderlind/not-so-super-admins.php
Control what (super) admins can do. Works with regular and multisite WordPress
<?php
/*
Plugin Name: Not So Super Admin
Plugin URI: https://gist.github.com/soderlind/8101b2e45e80b594e9c5
Description: Control what (super) admins can do
Author: Per Soderlind
Author URI: http://soderlind.no
Version: 0.0.6
License: GPL
Tags: multisite, admin