- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
<?php | |
/** | |
* ArrayAsAcsiiTable.php | |
* 31-Jul-2013 | |
* | |
* Ordinarily, I would suggest use of PEAR's Console_Table package, this | |
* is just an example solution for the first test suggested at | |
* http://phpixie.com/blog/test-tasks-for-php-interviews-that-developers-will-enjoy-solving/ | |
* | |
* PHP Version 5 |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
''' | |
sort_zset_cols.py | |
Copyright 2013 Josiah Carlson | |
Released into the public domain. | |
''' | |
''' | |
Let's imagine that there are 3 restaurants with price, score, distance info | |
being: |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
I have following object:
var cities={10:'Tashkent', 14:'Karakalpakiya', 16:'Andijan'};
I want sort it by city names, so after sort it should be:
var cities={16:'Andijan', 14:'Karakalpakiya', 10:'Tashkent'};
But I can't sort object properties, instead can convert object into array, then sort items.
# app/assets/javascripts/ember-app/templates/partials/_header.js.coffee | |
%nav.navbar.navbar-default.navbar-fixed-top | |
.container | |
.navbar-header | |
%btn.navbar-toggle{ data: { target: '.navbar-collapse', toggle: 'collapse' }, type: 'button' } | |
%span.sr-only Toggle Navigation | |
%span.icon-bar | |
%span.icon-bar | |
%span.icon-bar | |
= hb 'link-to "index" class="navbar-brand"' do |
(function() { | |
// Do not use this library. This is just a fun example to prove a | |
// point. | |
var Bloop = window.Bloop = {}; | |
var mountId = 0; | |
function newMountId() { | |
return mountId++; | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.