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
// LECTURES | |
Frontend engineering introduction (2 x 1 hour) | |
- web development is | |
- history | |
- current situation | |
- languages and platforms | |
- FE definition | |
- Job specific | |
- knowledge areas |
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
// http://jsfiddle.net/Exyk5/ | |
function decode(text){ | |
var lat='`~!@#$%^&qwertyuiop[]asdfghjkl;\'zxcvbnm,./QWERTYUIOP{}ASDFGHJKL:"|ZXCVBNM<>?', | |
cyr='ёЁ!"№;%:?йцукенгшщзхъфывапролджэячсмитьбю.ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭ/ЯЧСМИТЬБЮ,', | |
from = cyr, | |
to = lat, | |
newtext = ''; | |
if( /[a-zA-Z]{2}/.test(text) ) { |
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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
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
// (obj, ['a', 'b', {'c':'b'}, 'e', 'f']) > {a:,b:,c:,e:,f:} | |
function mapper (obj, fields) { | |
var newObj = {}; | |
for(var i = 0, cnt = fields.length; i<cnt; i++) { | |
var f = fields[i]; | |
if(typeof f == 'string') { | |
newObj[f] = obj[f] | |
} else { | |
for(var k in f) { | |
newObj[k] = obj[ f[k] ]; |
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
// make sure underscore.js & backbone.js included above | |
$ = {ajax: function(){ | |
console.log('BAM!'); | |
console.dir(arguments); | |
}} | |
var BaseModel = Backbone.Model.extend({ | |
url: 'whatever', | |
save: function(attributes, options){ |
NewerOlder