Skip to content

Instantly share code, notes, and snippets.

View ovcharik's full-sized avatar

Maksim Ovcharik ovcharik

  • Saint Petersburg, Russia
View GitHub Profile
@ovcharik
ovcharik / geocomplite.markdown
Last active August 29, 2015 14:01
JQuery autocomplite from google autocomplite service with groups and additional custom sources.

JQuery autocomplite with google places service and groups

Виджет для jquery.ui, базирует на стандартном автокомплите.

Возможности

Автоматический поиск данных через Google Places, фильтрация и группировка результатов. Также есть возможность загрузки полной информации о выбранном месте.

Требования

@ovcharik
ovcharik / Gruntfile.coffee
Created June 14, 2014 07:19
Gruntfile for clientside haml templates
module.exports = (grunt) ->
grunt.initConfig
haml:
compile:
options:
namespace: 'window.wa.templates'
language: 'js'
target: 'js'
includePath: true
@ovcharik
ovcharik / gist:c0eef241b0f40072cda5
Last active August 29, 2015 14:06
Parse cookies
document.cookie.split(";").map(function(s){return s.trim().split("=")}).reduce(function(p,c){c[0]&&(p[c[0]]=c[1]);return p;},{})
@ovcharik
ovcharik / README.md
Last active August 29, 2015 14:07
Multiple delivery options for Rails 4

В smtp_settings.yml забиваем адреса с настройками.

В маилере пишем

class MyMailer < ActionMailer::Base
  use '[email protected]'[, <name>]
end
@ovcharik
ovcharik / event_mixin.coffee
Last active August 29, 2015 14:15
Coffee tricks
@EventMixin =
_eventHandlers: ->
@__eventHandlers ||= {}
_getHandlers: (name) ->
@_eventHandlers()[name] ||= []
return @_eventHandlers()[name]
_setHandlers: (name, value) ->
@_eventHandlers()[name] ||= value
@ovcharik
ovcharik / bootbox.coffee
Created April 28, 2015 05:51
Meteor bootbox
old = bootbox.dialog
bootbox.dialog = (options) ->
if options.template and not options.message
unless Blaze.isTemplate(options.template)
throw new Error "options.template should be Blaze template"
options.message = " "
renderTemplate = true
@ovcharik
ovcharik / property_mixin.coffee
Created April 28, 2015 06:24
Reactive property mixin for meteor
@PropertyMixin =
property: (prop, options) ->
Object.defineProperty @prototype, prop, options
reactiveProperty: (name) ->
@property name,
get: ->
dep = @["_#{name}_dep"] ?= new Tracker.Dependency
dep.depend()
@ovcharik
ovcharik / arc-theme.css
Last active June 22, 2018 20:15
Tilda tab style
notebook > header {
background: #f5f6f7;
border: none;
}
notebook > header > tabs {
background: transparent;
}
notebook > header > tabs > tab {
background: transparent;
color: #8e9195;
@ovcharik
ovcharik / createjs.InverseAlphaFilter.coffee
Last active August 29, 2015 14:23
createjs.InverseAlphaFilter.coffee
class InverseAlphaFilter extends createjs.Filter
constructor: ->
toString: ->
return "[InverseAlphaFilter]"
clone: ->
new InverseAlphaFilter
@ovcharik
ovcharik / README.md
Last active September 17, 2015 19:44