Skip to content

Instantly share code, notes, and snippets.

@hpfast
Last active August 29, 2015 14:14
Show Gist options
  • Save hpfast/022b19c39d901560263a to your computer and use it in GitHub Desktop.
Save hpfast/022b19c39d901560263a to your computer and use it in GitHub Desktop.
demo gist
<html>
<head>
<title>Cool stuff</title>
<script>
document.write('this is cool');
</script>
</head>
<body>
Cool stuff happening here.
</body >
</html>
"use strict"
var fs = require('fs');
function convertThis() {
if(process.argv.length > 2) {
var myfile = process.argv[2];
if(fs.existsSync(myfile)) {
var content = fs.readFileSync(myfile, 'utf8');
fs.writeFileSync(myfile, content.toUpperCase());
console.log("Done");
} else {
console.log("File does not exist - " + myfile);
}
} else {
console.log("Pass on a file name/path");
}
}
exports.convert = convertThis;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment