Skip to content

Instantly share code, notes, and snippets.

var rules = {
"modern": {
"20x20": {
"glance": 100,
"mat": 200
},
"27x27": {
"glance": 300,
"mat": 400
}
@jsmarkus
jsmarkus / Bar.js
Last active December 12, 2015 04:18
define(function (require, exports, module) {
var foo = require('Foo');
foo('hello!');
});
//неявная зависимость Bar.js от Foo.js
foo('hello!');
define(function(require) {
// var uix = require('uix/uix');
require('css!bootstrap/css/bootstrap');
require('css!bootstrap/css/bootstrap-responsive');
var DefaultFactory = require('uix/DefaultFactory');
var f = new DefaultFactory();
var n = f.create(
[
'bs.container', {span:4, visiblePhone:false},
.scr {
width : 50px;
height : 50px;
border : 1px solid black;
}
@jsmarkus
jsmarkus / transpile.coffee
Created December 14, 2012 13:31
parse all global variables from js file
esprima = require 'esprima'
exports.extractExports = (source)->
tree = esprima.parse source
exportedIdentifiers = []
for node in tree.body
if node.type is 'VariableDeclaration'
for decl in node.declarations
exportedIdentifiers.push decl.id.name
@jsmarkus
jsmarkus / things-to-forget-en.md
Created December 10, 2012 19:50
Seamless Application Manifest

this document is working draft

##Things modern web developer should forget forever.

  1. HTML
  2. DOM
  3. Asynchronous programming
  4. JavaScript
  5. Terms "Client-side" and "Server-side"
  6. AJAX, REST, HTTP
var form = new ko.Form({
layout : 'vertical',
title : 'Create post',
fields : [
{
name : 'title',
type : 'Text'
},
{
name : 'body',
{
a : 74,
longProperty : 74447,
foo : 'sdfs'
}
@jsmarkus
jsmarkus / .gitconfig
Created October 18, 2012 06:30
gitconfig
[user]
name = User
email = [email protected]
[core]
compression=9
[alias]
br = branch
ci = commit
co = checkout
desc = describe