Colors of social brands is [here][2]
Facebook Share
http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwebsite.com&t=url%20encoded%20text
Facebook Like Button
http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwebsite.com
/** | |
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object | |
* | |
* @param string url | |
* @param object callback | |
* @param mixed data | |
* @param null x | |
*/ | |
function ajax(url, callback, data, x) { | |
try { |
/***************************************************************************** | |
* __ __ _ _ ___ _ | |
* \ \/ _\ /\/\ (_)_ __ | |_ _ _ / __\ __ ___ ___| |__ | |
* \ \ \ / \| | '_ \| __| | | | / _\| '__/ _ \/ __| '_ \ | |
* /\_/ /\ \ / /\/\ \ | | | | |_| |_| | / / | | | __/\__ \ | | | | |
* \___/\__/ \/ \/_|_| |_|\__|\__, | \/ |_| \___||___/_| |_| | |
* |___/ | |
* | |
* Identifying and Eliminating Code Smells | |
* |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Just wanted a quick start guide for myself so that I wouldn't have to keep rooting through Google to remember all this stuff. Hopefully it helps other people.
If you had other ideas or suggestions please leave a comment.
The first time I bought a Pi I was enormously frustrated with myself because I didn't own all of this stuff. Kept having to order things off of Amazon and wait to get started... very irritating. This is all good stuff to have laying around anyway:
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
var serialport = require('node-serialport') | |
var sp = new serialport.SerialPort("/dev/ttyO3", { | |
parser: serialport.parsers.raw, | |
baud: 9600 | |
}) | |
sp.on('data', function(chunk) { | |
console.log(chunk.toString('hex'), chunk.toString(), chunk) | |
}) |
findPerpendicularDistance = ( point, line ) -> | |
[pointX,pointY] = point[0..1] | |
lineStart = x: line[0][0], y: line[0][1] | |
lineEnd = x: line[1][0], y: line[1][1] | |
slope = ( lineEnd.y - lineStart.y ) / ( lineEnd.x - lineStart.x ) | |
intercept = lineStart.y - ( slope * lineStart.x ) | |
Math.abs( slope * pointX - pointY + intercept ) / Math.sqrt( Math.pow( slope, 2) + 1) | |
douglasPeucker = ( points, epsilon ) -> | |
maxIndex = maxDistance = 0 |
var p1 = { | |
x: 20, | |
y: 20 | |
}; | |
var p2 = { | |
x: 40, | |
y: 40 | |
}; |
/** | |
* My take on Bresenham's line algorithm | |
* | |
* http://en.wikipedia.org/wiki/Bresenham's_line_algorithm | |
* | |
* Based off of the limited algorithm, amended by own research, | |
* trial and error, and plain stubborness. | |
* | |
* Demo: http://jsfiddle.net/VFybR/26/ | |
*/ |