As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| <form action="/login" id="login-form"> | |
| Username: <input type="text" id="username"><br> | |
| Password: <input type="password" id="password"><br> | |
| <button id="login" disabled="true">Login</button> | |
| </form> |
| get Android source code: http://source.android.com/source/downloading.html | |
| $ cd /path/to/android-src | |
| $ cd system/core/libmincrypt/ | |
| $ gcc -c *.c -I../include | |
| $ ar rcs libmincrypt.a *.o | |
| $ cd ../mkbootimg | |
| $ gcc mkbootimg.c -o mkbootimg -I../include ../libmincrypt/libmincrypt.a | |
| $ cd ../cpio | |
| $ gcc mkbootfs.c -o mkbootfs -I../include |
| // Generates a URL-friendly "slug" from a provided string. | |
| // For example: "This Is Great!!!" transforms into "this-is-great" | |
| function generateSlug (value) { | |
| // 1) convert to lowercase | |
| // 2) remove dashes and pluses | |
| // 3) replace spaces with dashes | |
| // 4) remove everything but alphanumeric characters and dashes | |
| return value.toLowerCase().replace(/-+/g, '').replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, ''); | |
| }; |
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
| // Use built in or binary modules | |
| var crypto = require('crypto'); | |
| var hash = crypto.createHmac("sha1",key).update(signatureBase).digest("base64"); |
| var data = "do shash'owania"; | |
| var crypto = require('crypto'); | |
| crypto.createHash('md5').update(data).digest("hex"); |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
| /* | |
| Node.js, express, oauth example using Twitters API | |
| Install Node.js: | |
| curl -0 http://nodejs.org/dist/v0.6.11/node-v0.6.11.tar.gz | |
| tar -zxf node-v0.6.11.tar.gz | |
| cd node-v0.6.11 | |
| ./configure | |
| make | |
| make install |