Skip to content

Instantly share code, notes, and snippets.

View Dionid's full-sized avatar
👌

David Shekunts Dionid

👌
View GitHub Profile
@Dionid
Dionid / javascript_resources.md
Last active August 29, 2015 14:11 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@Dionid
Dionid / css_resources.md
Last active August 29, 2015 14:11 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@Dionid
Dionid / gist:86cfc15fbf3afcbab3eb
Last active August 29, 2015 14:14
TABLE AND TABLE-CELL
With TABLE:
1. You cant set overflow: hidden for Firefox
With TABLE-CELL:
1. You cant set HEIGHT
2. You cant set WIDTH
Текст:
1. Крайне аккуратно надо располагать текст на изображениях. Он должен быть или жирным или же картинка должна иметь достаточное количество оттеньющих ее эффектов (в виде размытия, наложения цвета, наложения шума). Также, возможно использование текста в определенных местах фотографии, но это должна позволять сама фотография
2. Правильное расположение текста - залог успеха. Если есть возможность красиво написать текст, не прибегая к графическим еллементам, то стоит воспользоваться возможностью.
3. Максимально доходчиво объеснять людям, что им надо сделать следующим шагом (в особенности по навигации сайта)
4. Стоит найти как можно больше вариантов выделения текста:
.1. Подчеркивание линией
.2. Обособление в рамку (толстую, тонкую)
.3. Геометрические фигуры слева\справа
.4. Текст с более маленьким размером, другим шрифтом\цветом
@Dionid
Dionid / gist:9e21b1cacaf0df034238
Created January 26, 2015 10:56
FadeIn\FadeOut
1. It doesnt correctly works with css FILTERS
@Dionid
Dionid / gist:116ceab955e90996aa19
Last active August 29, 2015 14:14
MOUSEWHEEL JQUERY Coffee
$.fn.mousewheel = (handler)->
target = $(@)[0]
if target.addEventListener
target.addEventListener("mousewheel", handler, false);
target.addEventListener("DOMMouseScroll", handler, false);
else
target.attachEvent("onmousewheel", handler);
@
// DIRECTION
Model.parse - приспособлен для того, что бы обработать пришедшую с сервера информацию. В конце нужно вернуть объект, к которому будет применен метод .set() (не в коем случае нельзя возвращать что-либо другое, особенно console.log, также нельзя в parse добавлять какие-либо другие методы, которые не взаимодействуют с информацией)
Collection.parse - тоже самое, что и Model.parse, но можно применить метод add внутри (хотя, возмоэно есть и олее элегнтный способ это обойти)
@Dionid
Dionid / gist:b224363d00cbb011ba95
Created October 28, 2015 15:06
Simple Model example on coffeescript
class ModelTZ
constructor: (@attributes)->
@calls = {}
return @
set: (property, value)->
@attributes[property] = value
@changed(property)
get: (property)->
@Dionid
Dionid / gist:c8244bccabb5506ab3ac
Created October 28, 2015 18:25
JQuery light functions
window.$ =
# Получаем элемент по селектору
# Если родитель не передан - родителем является document
$: (root, selector) ->
if arguments.length is 1
selector = root
root = document
# Если передали не селектор, а Node - возвращаем его же
return selector if $.isNode(selector)
# массив или NodeList - возвращаем первый элемент из списка
@Dionid
Dionid / gist:df52c108dd3d5a1bf121
Created October 28, 2015 20:06
Cross browser add and remove eventListener
addEventListener = (el, evt, fn)->
if el? && evt? && fn? && typeof(fn) == 'function'
if el.addEventListener
el.addEventListener(evt, fn, false)
else if el.attachEvent
el.attachEvent('on' + evt, fn)
else
el['on' + evt] = fn;
return el