Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// Place this with the other middleware inclusion in routes/index.js | |
keystone.pre('admin', middleware.enforcePermissions); |
// Books | |
https://www.amazon.com/How-Cheat-3ds-Max-2015-ebook/dp/B00ZUU4AEC/ | |
// Resources, Tutorials | |
http://area.autodesk.com/ | |
https://www.youtube.com/user/3dsMaxHowTos | |
http://www.lynda.com/3ds-Max-training-tutorials/138-0.html |
require File.join(File.dirname(__FILE__), '../../lib/account') | |
Given(/^I have \$(\d+) in my account$/) do |starting_balance| | |
@account = Account.new(starting_balance) | |
end | |
When(/^I request my account balance$/) do | |
@retrieved_balance = @account.balance | |
end |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
// UTF8 Module | |
// | |
// Cleaner and modularized utf-8 encoding and decoding library for javascript. | |
// | |
// copyright: MIT | |
// author: Nijiko Yonskai, @nijikokun, [email protected] | |
(function (name, definition, context, dependencies) { | |
if (typeof context['module'] !== 'undefined' && context['module']['exports']) { if (dependencies && context['require']) { for (var i = 0; i < dependencies.length; i++) context[dependencies[i]] = context['require'](dependencies[i]); } context['module']['exports'] = definition.apply(context); } | |
else if (typeof context['define'] !== 'undefined' && context['define'] === 'function' && context['define']['amd']) { define(name, (dependencies || []), definition); } | |
else { context[name] = definition.apply(context); } |
// created by greg reimer ("gregreimer" at gmail) http://obadger.com/ | |
function createHistogram(rFunc) { | |
var arr = []; | |
var size = 30; | |
for (var i=0; i<size; i++){ | |
arr[i] = 0; | |
} | |
for (var i=0; i<1000000; i++){ | |
arr[Math.floor(rFunc() * size)]++; |
Create an .htaccess file in the webroot:
AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user
Create a .htpasswd file:
htpasswd -c /app/www/.htpasswd [username]
Array.prototype.safeForEach = function ( fn ) { | |
var len = this.length; | |
for ( var cur = 0, cur < len; ++cur ) { | |
for ( var i = 0; i < len; ++i ) { | |
if ( this.hasOwnProperty[ i ] ) { | |
if ( i === cur ) { | |
fn && fn( this[ i ], i, this ); | |
} | |
} | |
} |
function(data){ | |
//loop through the results with the following function | |
$.each(data.photoset.photo, function(i,item){ | |
//build the url of the photo in order to link to it | |
var photoURL = 'http://farm' + item.farm + '.static.flickr.com/' + item.server + '/' + item.id + '_' + item.secret + '_m.jpg' | |
//turn the photo id into a variable | |
var photoID = item.id; |
function average (arr) | |
{ | |
return _.reduce(arr, function(memo, num) | |
{ | |
return memo + num; | |
}, 0) / arr.length; | |
} |