Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
I've known people at nodejitsu for years, since before the company even existed. I still consider many of them friends. That said, somebody over there has lost their mind.
Trademarks are an important part of open source. They protect the integrity of the trust that is built by any project. A classic example of why this is the case is Firefox. Suppose that a malware producer takes the Firefox codebase, which is free and open source, packages up their malware with it and then releases it as "Firefox". Then they buy search advertising and suddenly their bad and malicious version of Firefox is the first result on search engines across the web. This is clearly a bad thing for Firefox and open source everywhere, but what can Mozilla do to protect their community of users?
They can't enforce a software license since the use is permitted under the Mozilla Public License. They can, however, enforce on these hypothetical bad actors using their trademark on the word "Fi
// A machine definition | |
// (e.g. `machines/do-stuff.js`) | |
module.exports = { | |
friendlyName: 'Do stuff', | |
// ... | |
inputs: { | |
<template> | |
<textarea | |
:id="id" | |
:name="name" | |
:value="value" | |
:placeholder="placeholder" | |
:rows="rows" | |
:cols="cols" | |
class="form-control" | |
@dragover.prevent |
function getLastEan13Digit(ean) { | |
if (!ean || ean.length !== 12) throw new Error('Invalid EAN 13, should have 12 digits') | |
const multiply = [1, 3] | |
let total = 0 | |
ean.split('').forEach((letter, index) => { | |
total += parseInt(letter, 10) * multiply[index % 2] | |
}) |
const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
module.exports = { | |
/* ... */ | |
modules: [ | |
['~/modules/sentry', { | |
public_key: '', | |
private_key: '', | |
project_id: '', | |
}], | |
], | |
/* ... */ |
language: node_js | |
node_js: | |
- "8" | |
cache: | |
directories: | |
- "node_modules" | |
branches: | |
only: |
// Existing imports | |
import Vue from 'vue' | |
import router from './router' | |
import store from './store' | |
// Other existing code here | |
// Add 'app' variable | |
const app = new Vue({ | |
// Existing options |