Skip to content

Instantly share code, notes, and snippets.

View skarankevich's full-sized avatar

Sergey Karankevich skarankevich

View GitHub Profile
@skarankevich
skarankevich / ellipsis.css
Created November 16, 2015 12:13
Truncate String with Ellipsis
.truncate {
width: 250px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@skarankevich
skarankevich / 01_closure.js
Last active November 19, 2020 09:53
FE Test
(function() {
console.log(abc);
var abc = "abc";
console.log(myFunc());
function myFunc() {
var def = abc + 'def';
@skarankevich
skarankevich / angular.md
Last active November 4, 2016 12:14
Angular questions
  • What is data-binding? Which attribute we use for data binding?
  • What difference between service, factory and provider?
  • What is interceptor?
  • When do we use $scope.$watch(), $scope.$digest() and $scope.apply()?
  • Which routing system do you use? What does deep linking mean?
  • What does ng-strict-di attribute means?
  • What the difference between Angular version 1.4 and 1.5?
@skarankevich
skarankevich / regexp.txt
Last active March 27, 2018 06:44
RegExp for Video ID from YouTube links
https?:\/\/(?:www.)?youtu(?:.be|be.com)\/(?:.+?v=|)([a-zA-Z0-9_-]{11})/
Works with:
https://www.youtube.com/watch?v=6QjIHnb5Ivs
https://youtu.be/6QjIHnb5Ivs?t=37
https://www.youtube.com/watch?v=6QjIHnb5Ivs&feature=youtu.be#t=37
https://youtu.be/6QjIHnb5Ivs
http://youtu.be/6QjIHnb5Ivs?t=37