Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts
Mar 5, 2015
Jun 6, 2014
Apr 4, 2013
TodoMVC - Helping you select an MV* framework
https://github.com/addyosmani/todomvc - Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, Spine and many more
Labels:
angular,
backbone,
ember,
javascript
Jan 3, 2013
JavaScript profiling, Console
console.dir(obj);
console.time("t1")
....
console.timeEnd("t1")
console.profile("p1")
...
console.profileEnd("p1")
console.trace()
console.count("my_fun_count")
Labels:
chrome,
firebug,
javascript,
profiling
Dec 20, 2012
Modernizr
http://modernizr.com/ is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
Labels:
javascript
Dec 11, 2012
Links roundup from dotjs.eu
http://www.cubicweb.org/blogentry/2532796
Chrome developer tools
yeoman
grunt.js
backbone.js
Dart
TypeScriptLang
Express.js
Mocha
Testacular
SASS
Angular.js
Enyo.js
Socket.io
when.js
Coffeescript
Source Maps explained
Chrome developer tools
yeoman
grunt.js
backbone.js
Dart
TypeScriptLang
Express.js
Mocha
Testacular
SASS
Angular.js
Enyo.js
Socket.io
when.js
Coffeescript
Source Maps explained
Labels:
coffee script,
javascript,
javascript framework,
less
Oct 11, 2012
Oct 1, 2012
Aug 6, 2012
Jun 18, 2012
Apr 28, 2012
Chrome Developers Tools
Navigation
Ctrl + O
Ctrl + Shift + O
Ctrl + L
Search
Ctrl+Shift+FPersisting Changes
- Upon an external style sheet rule modification, the respective resource text is updated in the Resources panel, and the revision history is stored for such style sheet resources until the DevTools window is closed.
- Activate the Resources panel, find tutorial.css in the resource tree. Note that the tree node is expandable. Click the arrow next to the node title, and you will see all the resource modifications that you have made above.
Scripts Panel
Pause on Next JavaScript Statement
Pause on Exceptions
Pause on Uncaught Exceptions (click twice)
Break on Subtree Modifications (right click on the Elements' panel tag)
Breakpoints on XHR (XHR breakpoint with empty URL filter will match any XHR)
Breakpoints on JavaScript Event Listeners
Documentation: https://developers.google.com/chrome-developer-tools/docs/overview
Shortcuts: https://developers.google.com/chrome-developer-tools/docs/shortcuts
Video: http://www.youtube.com/watch?v=N8SS-rUEZPg
Labels:
chrome,
debugging,
ide,
javascript
Jan 17, 2012
Nov 30, 2011
Вывод прошедшего времени в удобочитаемом виде на JavaScript
function date_from_string(dt){
// 2011-11-30 15:40:50
var df = dt.split(' ');
var d = df[0].split('-');
var t = df[1].split(':');
return d1 = new Date(d[0],d[1]-1,d[2],t[0],t[1],t[2]);
}
function diff_date(d1){
var r = (new Date() - d1)/1000;
var tt = {
sec: ['{} секунд','{} секунда','{} секунды'],
min: ['{} минут','{} минута','{} минуты'],
hour: ['{} часов','{} час','{} часа'],
day: ['{} дней','{} день','{} дня']
}
function sec(x,dtt){
var r;
x = x.toFixed(0);
if(x>=11 && x<=14) r = null
else {
var s = '' + x;
if(s.length>1) s = s.substring(1);
r = { '1':dtt[1], '2':dtt[2], '3':dtt[2], '4':dtt[2] }[s];
}
if(!r) r = dtt[0];
return r.replace('{}',x)
}
if(r<60) return sec(r, tt.sec) + ' назад';
r = r / 60;
if(r<60) return sec(r, tt.min) + ' назад';
r = r / 60;
if(r<24) return sec(r, tt.hour) + ' назад';
r = r / 24;
if(r<1) return 'сегодня';
if(r<2) return 'вчера';
return sec(r, tt.day) + ' назад';
}
Labels:
javascript
Subscribe to:
Posts (Atom)

