Skip to content

Instantly share code, notes, and snippets.

View beautyfree's full-sized avatar
😼

Alexey Elizarov beautyfree

😼
View GitHub Profile

Angular Logo

Обзор

Angular.js, JavaScript Framework, на котором теперь ведется вся разработка в компании CloudMill. В этом обзоре будут приведены основные ссылки на изучение, так же он будет постоянно пополняться необходимыми сниппетами и правилами оформления.

Инфраструктура

Мы работаем с проектом Yeoman, он создает базовую структуру, настраивает тесты и grunt для минификации кода для продакшена, так же дает live-reload и много других полезностей.

#CSS & HTML Development Spec#

##Браузеры## Если не оговорено отдельно, то считать эти версии минимально поддерживаемыми. Никакой поддержки IE6 и IE7, даже бесплатно делать не нужно и запрещается! Под Graceful Degardation подразумевается частичный отказ функционала, скругленные углы, тени, анимация. Главное что бы верстка не разваливалась. Если вы знаете браузер, которого нет в этом списке его поддержка не нужна и запрещена.

Вся верстка должна быть mobile ready. Это значит, что сайт должен правильно отображаться на мобильных устройствах (список ниже). Элементы не должны ехать, зум должен работать, при перевороте устройств, все должно правильно репозиционироваться. В случае если не используется responsive design.

####Graceful Degradation####

  • IE9
@beautyfree
beautyfree / user.rb
Created January 2, 2014 11:35 — forked from Olefine/user.rb
# encoding: utf-8
class User < ActiveRecord::Base
attr_accessor :read # user's agreement
scope :unbanned, where(:banned => false)
scope :last_users, ->(count) { order("id DESC").limit(count) }
include Models::User::City
include Models::User::MessageStuff
@beautyfree
beautyfree / user.rb
Created January 2, 2014 11:34 — forked from kirs/user.rb
class User < ActiveRecord::Base
#default_scope where(:banned => false)
scope :unbanned, where(:banned => false)
include ChooseCity
rolify
acts_as_voter
has_karma(:questions, :as => :submitter, :weight => 0.5)
mount_uploader :avatar, AvatarUploader
@beautyfree
beautyfree / css_resources.md
Created December 18, 2013 14:54 — 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

@beautyfree
beautyfree / rails_resources.md
Created December 18, 2013 14:54 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@beautyfree
beautyfree / javascript_resources.md
Created December 18, 2013 14:54 — 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
@beautyfree
beautyfree / 0_reuse_code.js
Created December 18, 2013 14:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@beautyfree
beautyfree / node_debian_init.sh
Created January 22, 2012 13:34 — forked from peterhost/node_debian_init.sh
Daemon init script for node.js based app/server (DEBIAN/UBUNTU)
#!/bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
@beautyfree
beautyfree / APPNAME
Created January 7, 2012 14:37 — forked from eculver/APPNAME
init.d script for node.js for debian
#! /bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28