A Pen by Vladimir Tsvang on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 ) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rc = require "runtime-configuration" | |
| rc "npm", ( err, config ) -> | |
| rc "npm", ( err, session ) -> | |
| session.set "foo", "bar" | |
| session.get "foo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "coeffs": { | |
| "baseSqMeterPrice": 272.8, | |
| "objectTypes": [ | |
| 1, # офис, административное освещение | |
| 1.3, # Складское помещение | |
| 1.6, # Промышленное помещение | |
| 1, # магазин, выставочный зал | |
| 1, # отель, ресторан, центр досуга | |
| 1.7, # спортивное сооружение |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(function($) { | |
| var $selectPhoto = $('#selectPhoto') | |
| $selectPhoto.photoUploader( $selectPhoto.data("action"), true ) | |
| // /illuminator/1/upload -> куда отправлять запрос | |
| // true -> multiple | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(function($) { | |
| $("#filters").on("change", function(event) { | |
| $("#filter-result").load("/filter.html", $(this).serialize()); | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| uploader: function(selector, multiple) { | |
| var def, | |
| _this = this; | |
| if (multiple == null) { | |
| multiple = false; | |
| } | |
| def = new $.Deferred(); | |
| new qq.FineUploader({ | |
| element: $(selector).get(0), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "default_locale": "ru", | |
| "openstat": 2231178, | |
| "tv": false, | |
| "dcSubdomains": [ | |
| "msk-st", | |
| "sz-st", | |
| "dv-st" | |
| ], | |
| "acl": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" ) | |
| } | |
| } ) |