Skip to content

Instantly share code, notes, and snippets.

View paveleremin's full-sized avatar

Pavel Eremin paveleremin

View GitHub Profile
@paveleremin
paveleremin / gist:86dafdb4341244fc3a94
Last active February 10, 2019 14:23
Brackets are correctly nested (two different approaches)
/**
* Implement function check (text) which checks whether brackets within text are correctly nested.
* You need to consider brackets of three kinds: (), [], {}.
*/
/**
* STACK approach
*/
function check(str){
var brackets = "()[]{}",
@paveleremin
paveleremin / 1.scss
Created May 13, 2015 14:34
[Examples] SCSS
@for $i from 1 through 10 {
.indent#{$i} {
@if $i > 1 {
margin-left: 16px * ($i - 1);
}
}
}
.top-offers {
margin-top: -2px;
@paveleremin
paveleremin / om_dashboard.jpg
Last active August 29, 2015 14:21
[Examples] Interface
om_dashboard.jpg
@paveleremin
paveleremin / some-view.html
Created May 12, 2015 18:49
[Examples] View
<ul class="nav nav-tabs mb20">
<li>
<a href="/batch-insert/">
<i class="fa fa-align-justify"></i>
Текст
</a>
</li>
<li>
<a href="/files/">
<i class="fa fa-th"></i>
@paveleremin
paveleremin / some-directive.js
Created May 12, 2015 18:42
[Examples] Directive
'use strict';
angular.module('SomeProject')
.directive('selectVehicleColor', function(){
return {
scope: {
model: '=',
colors: '=selectVehicleColor',
title: '@'
},
<?php phpinfo(); ?>