As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs 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
function getStyle(el, styleProp) { | |
var value, defaultView = el.ownerDocument.defaultView; | |
// W3C standard way: | |
if (defaultView && defaultView.getComputedStyle) { | |
// sanitize property name to css notation (hypen separated words eg. font-Size) | |
styleProp = styleProp.replace(/([A-Z])/g, "-$1").toLowerCase(); | |
return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp); | |
} else if (el.currentStyle) { // IE | |
// sanitize property name to camelCase | |
styleProp = styleProp.replace(/\-(\w)/g, function(str, letter) { |
var fs = require('fs') | |
, path = require('path') | |
, _ = require('underscore'); | |
var rootPath = "/path/to/remove"; | |
removeDirForce(rootPath); | |
// path should have trailing slash | |
function removeDirForce(dirPath) { | |
fs.readdir(dirPath, function(err, files) { |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>tableToExcel Demo</title> | |
<script src="tableToExcel.js"></script> | |
</head> | |
<body> | |
<h1>tableToExcel Demo</h1> | |
<p>Exporting the W3C Example Table</p> |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
/** | |
* Created with IntelliJ IDEA. | |
* User: Alexander <estliberitas> Makarenko | |
* Date: 04.01.13 | |
* Time: 3:25 | |
*/ | |
'use strict'; | |
var fs = require('fs') | |
, net = require('net') |
Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
var R = require("request"); | |
var key = process.env.TWITTER_CONSUMER_KEY; | |
var secret = process.env.TWITTER_CONSUMER_SECRET; | |
var cat = key +":"+secret; | |
var credentials = new Buffer(cat).toString('base64'); | |
var url = 'https://api.twitter.com/oauth2/token'; | |
R({ url: url, |
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 14, | |
// font family with optional fallbacks |