Summary | One example for embed javascript into windows bat file without any external tools or files. |
Env | windows node.js jscript |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
#!/usr/bin/env ruby | |
# Merge Audiobook MP3s | |
# This script will iterate through directories of audiobooks, | |
# combine the MP3 files and output the new file to a destination directory. | |
# | |
# Usage: ruby audiobook_merge.rb [SRC] [DEST] | |
# Example: ruby audiobook_merge.rb /audiobooks /audiobooks/combined | |
abort "Could not locate the 'cat' binary on your computer." if `which cat`.empty? |
document.getElementsByClassName("input")[1].innerHTML="This message was written via JS script! "; // Fills the text box message | |
var input = document.getElementsByClassName("icon btn-icon icon-send");//Grabs the send button | |
input[0].click();// Clicks the send button |
downloadArquivo("./video.ogv", function(progresso, total, perc) { | |
document.querySelector("progress").value = perc; | |
}).then(function(arrayBuffer) { | |
//cria um Blob a partir do arrayBuffer | |
var blob = new Blob([arrayBuffer], { | |
type: "video/ogg" | |
}); | |
//cria o elemento video | |
var video = document.createElement("video"); | |
video.autoplay = true; |
import os, os.path, time, urllib, urllib2, json, datetime | |
base = os.getcwd() + '/packages/' | |
apiUrl = 'https://atmospherejs.com/a/packages/findByNames' | |
for dirname in os.listdir(base): | |
max_mtime = 0 | |
if os.path.isdir(base + dirname): | |
packageName = dirname.replace('-', ':', 1) | |
for fname in os.listdir(base + dirname): | |
full_path = base + dirname + '/' + fname |
/* | |
- Go to the group chat settings and email yourself the chat log | |
(no attachments), use that txt here. | |
(You'll need an android phone or some tweaking of the regex on | |
line 11 to make this work.) | |
- You might also need to create a /us folder for the --export | |
option to work but let's not get ahead of ourselves here. | |
You still havent even sent yourself the log, have you? | |
*/ |
var Col = require('react-bootstrap/lib/Col') | |
var PageHeader = require('react-bootstrap/lib/PageHeader') | |
var React = require('react') | |
var Row = require('react-bootstrap/lib/Row') | |
var {connect} = require('react-redux') | |
var {reduxForm} = require('redux-form') | |
var DateInput = require('./DateInput') | |
var FormField = require('./FormField') | |
var LoadingButton = require('./LoadingButton') |
Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.
TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.
Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.
Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!
DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g
. Once you're finished, you also won't need to use sudo
to install npm modules globally.