Skip to content

Instantly share code, notes, and snippets.

View gearmobile's full-sized avatar
🇷🇺
Working remotely

Valery Semenenko gearmobile

🇷🇺
Working remotely
View GitHub Profile
@gearmobile
gearmobile / remove-node_modules.txt
Last active June 17, 2021 06:36 — forked from S-Voss/remove-node_modules.txt
Remove node_modules after pushing to git repository
# add 'node_modules' to .gitignore file
git rm --cached node_modules
git commit -m 'Added node_modules to .gitignore file. Also removed node_modules from git tracking and repository.'
git push origin master
@gearmobile
gearmobile / update_branch_list_from_remote.sh
Created May 1, 2021 17:43 — forked from dhonx/update_branch_list_from_remote.sh
Git: Update Branch List from Remote
# Source: https://stackoverflow.com/questions/36358265/when-does-git-refresh-the-list-of-remote-branches
# To update the local list of remote branches:
git remote update origin --prune
@gearmobile
gearmobile / app.component.html
Created September 3, 2020 07:23
Angular - Call child component method from parent
<button (click)="callChild()"> Call child </button>
<button (click)="childcomp.sayHello()"> Call child from view</button>
<app-comp-a #childcomp ></app-comp-a>
@gearmobile
gearmobile / async validation with debounce
Created April 14, 2020 06:07 — forked from ellipizle/async validation with debounce
async validation with debounce listening to value change
import { Component, OnInit } from '@angular/core';';
import { FormBuilder, FormGroup, Validators, AbstractControl, ValidationErrors } from '@angular/forms';
import { Router } from '@angular/router'
import { CommonValidators } from '../service/CommonValidator';
import { Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { GlobalService } from '../../shared/service/global.service';
import { AuthHttp } from 'angular2-jwt'
declare var $: any;
import 'rxjs/add/operator/delay';

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@gearmobile
gearmobile / netology_org.md
Created March 20, 2019 14:43
Кто есть кто в Нетологии

Кто есть кто в Нетологии

Менеджер по работе с преподавателями — Мария Горошко Вы можете писать мне по любому поводу. Все что касается расписания, оплат, недовольств, проблем, радости, замен, переносов и т.д. Даже если я не в силах буду решить ваш вопрос, я передам его тем, кто компетентен в данном случае.

Координаторы и курсы:

  • Старший координатор — Анна Попова, курирует професси FS, FE, FD, PD.
  • Мария Ушакова — GIT, PB, HJ, RA
  • Татьяна Демьяненко — JS, BHJ
  • Оксана Махонина — HTML, MQ, BJS
  • Вероника Лобанова — PY, DJ, ADPY
  • Мария Горошко — AN, AJS, AHJ
@gearmobile
gearmobile / gist:2bd1b6285511794275d5dc15adb26cd4
Last active February 19, 2019 12:37 — forked from lttlrck/gist:9628955
Rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@gearmobile
gearmobile / tokens.md
Created January 12, 2018 10:35 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию

Token-Based Authentication(JWT)

Preconditions:

В данной заметке рассматривается работа JWT с симметичным алгоритмом шифрования (HS256/HS384/HS512)

Основы:

Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им пароля с паролем, сохранённым в базе данных пользователей;

Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.

@gearmobile
gearmobile / todo.md
Last active September 1, 2016 11:18 — forked from carlsednaoui/todo.md
Sample to-do list for blog post

To do

  • Post to Hacker News
  • Share HN post on Twitter

Next

  • Raise $1MM
  • Retire