Skip to content

Instantly share code, notes, and snippets.

View vladtsf's full-sized avatar

Vlad Tsvang vladtsf

View GitHub Profile
HomeController = require 'controllers/home-controller'
NotificationsCollection = require 'models/notifications'
NotificationsView = require 'views/notifications-index-view'
module.exports = class NotificationsController extends HomeController
limit: 2
offset: 0
index: ( params ) ->
@vladtsf
vladtsf / A-Pen-by-Vladimir-Tsvang.markdown
Created August 23, 2013 11:10
A Pen by Vladimir Tsvang.
rc = require "runtime-configuration"
rc "npm", ( err, config ) ->
rc "npm", ( err, session ) ->
session.set "foo", "bar"
session.get "foo"
{
"coeffs": {
"baseSqMeterPrice": 272.8,
"objectTypes": [
1, # офис, административное освещение
1.3, # Складское помещение
1.6, # Промышленное помещение
1, # магазин, выставочный зал
1, # отель, ресторан, центр досуга
1.7, # спортивное сооружение
server {
listen 80;
server_name gadgets-house.net www.gadgets-house.net;
location / {
proxy_pass http://127.0.0.1:3000;
}
location /assets/ {
root /home/deploy/gadgets-house/current;
jQuery(function($) {
var $selectPhoto = $('#selectPhoto')
$selectPhoto.photoUploader( $selectPhoto.data("action"), true )
// /illuminator/1/upload -> куда отправлять запрос
// true -> multiple
})
jQuery(function($) {
$("#filters").on("change", function(event) {
$("#filter-result").load("/filter.html", $(this).serialize());
});
});
{
uploader: function(selector, multiple) {
var def,
_this = this;
if (multiple == null) {
multiple = false;
}
def = new $.Deferred();
new qq.FineUploader({
element: $(selector).get(0),
{
"default_locale": "ru",
"openstat": 2231178,
"tv": false,
"dcSubdomains": [
"msk-st",
"sz-st",
"dv-st"
],
"acl": {
node.addEventListener( "suspend", function( e ) {
if( this.buffered.length > 0 && this.buffered.end( this.buffered.length - 1 ).toFixed( 3 ) === this.duration.toFixed( 3 ) ) {
console.log( "buffering finished" )
}
} )