Most basic example of authenticating with Github in node.
Clone this gist, change keys inside config.js
and then hit npm install && node app.js
.
#!/usr/bin/env node | |
var argv = require('optimist') | |
.usage('Usage: --key=[consumer key] -secret=[consumer secret]') | |
.demand(['key', 'secret']) | |
.argv | |
; | |
var OAuth = require('oauth').OAuth; | |
var Step = require('step'); |
{ | |
"ease": [0.25, 0.1, 0.25, 1.0], | |
"linear": [0.00, 0.0, 1.00, 1.0], | |
"ease-in": [0.42, 0.0, 1.00, 1.0], | |
"ease-out": [0.00, 0.0, 0.58, 1.0], | |
"ease-in-out": [0.42, 0.0, 0.58, 1.0] | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>imgur oauth</title> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<script> | |
$(function () { | |
var extractToken = function(hash) { |
You appear to be advocating a new:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
I run a self-hosted auto-updating Firefox add-on being used by several million people. I am informed that I will need to "sign" it soon or it will quit working. (Deadlines are unclear; it seems like it may be as soon as June 30th.) I am looking for exact instructions as to how to make this happen.
I am not finding these instructions, so I am doing my best to puzzle things out.
Googling for things like "how to sign a firefox add-on" get me a lot of false leads. Mozilla should take down or at least modify these pages with current information:
https://developer.mozilla.org/en-US/docs/Signing_a_XPI
https://developer.mozilla.org/en-US/docs/Signing_an_extension
###Javascript Patterns ..thx @ Sorella
####Composition
function compose() {
var traits = [].slice.call(arguments)
return traits.reduce(function(result, trait) {
for (var k in trait)
"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.
And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)
Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.
Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="robots" content="noindex, nofollow"> | |
<meta name="googlebot" content="noindex, nofollow"> | |
<meta name="author" content="kasia99@gmx.de"> |