Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# default boring output of Psych.dump | |
--- | |
:response: | |
:body: ! "{\n \"page\": 1,\n \"results\": [\n \"item\", \"another\"\n ],\n | |
\ \"total_pages\": 0\n}\n" | |
:status: 200 | |
:person: | |
name: Steve | |
age: 24 | |
:array: |
let A be the given array of integers | |
let maxSum = -infinity, maxLeft = 0, maxRight = 0, currentMax = 0, left = 0, right = 0 | |
for i = 0 to A.length - 1 | |
currentMax += A[i] | |
if currentMax > maxSum | |
maxSum = currentMax | |
right = i; | |
maxLeft = left | |
maxRight = right | |
if currentMax < 0 |
Because I think the hardest part of getting started with AngularJS is it's esoteric names, I'm suggesting the following replacements of the AngularJS terminology. | |
scope -> state | |
factory -> data/models | |
filter -> helper | |
directive {restrict: 'E'} -> custom_tag | |
directive {restrict: 'A'} -> custom_attribute |
Slow HTTP attacks are denial-of-service (DoS) attacks in which the attacker sends HTTP requests in pieces slowly, one at a time to a Web server. If an HTTP request is not complete, or if the transfer rate is very low, the server keeps its resources busy waiting for the rest of the data. When the server’s concurrent connection pool reaches its maximum, this creates a DoS. Slow HTTP attacks are easy to execute because they require only minimal resources from the attacker.
Attack exploits the fact that most of modern web servers are not limiting the connection duration if there is a data flow going on, and with possiblity to prolong TCP connection virtually forever with zero or minimal data flow by manipulating TCP receive window size value, it is possible to acquire concurent connections pool of the application. Possibility to prolong TCP connection is described in several vulnerability reports: MS09-048, CVE-2008-4609, CVE-2009-1925, CVE-2009-1926 .
Prerequisites for the successful attack are: - victim serve
/** @jsx React.DOM */ | |
var STATES = [ | |
'AL', 'AK', 'AS', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'DC', 'FL', 'GA', 'HI', | |
'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', | |
'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', | |
'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY' | |
] | |
var Example = React.createClass({ |
I'm trying to consume an endpoint from my server to retrieve interactions. | |
This interaction is restricted by account and can only be accessed once you're within the account route. | |
URLs | |
---- | |
/activity/#/accounts/64/ <-- loads account information | |
/activity/#/accounts/64/interactions <-- I want to load interactions here | |
Ember is making a call to the interactions endpoint, but it's hitting the wrong path: |
// Assuming the following directory structure | |
/* | |
app/ | |
.meteor/ | |
client/ | |
server/ | |
collections/ | |
*/ | |
// 1. Create a collection |
/** | |
* api/models/User.js | |
* | |
* The user model contains the instance method for validating the password. | |
*/ | |
var bcrypt = require('bcrypt'); | |
function hashPassword(values, next) { | |
bcrypt.hash(values.password, 10, function(err, hash) { |