Perché è sempre cosa buona e giusta mettere i README:
- Font: Linux Libertine
- Geometry: Margine di soli 30mm
- Section: Linee sotto le section
- Babel: Supporto per l'italiano
const express = require('express'); | |
const htm = require('htm'); | |
const vhtml = require('vhtml'); | |
// create an html`` tag function for vhtml: | |
const html = htm.bind(vhtml); | |
const App = (props) => html` | |
<div class="app"> | |
<h1>This is an app</h1> |
const rules = [ | |
{ type: 'space', regex: /^\s/ }, | |
{ type: 'lParen', regex: /^\(/ }, | |
{ type: 'rParen', regex: /^\)/ }, | |
{ type: 'number', regex: /^[0-9\.]+/ }, | |
{ type: 'string', regex: /^".*?"/ }, | |
{ type: 'variable', regex: /^[^\s\(\)]+/ } // take from the beginning 1+ characters until you hit a ' ', '(', or ')' // TODO - support escaped double quote | |
]; | |
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Adjustments particular to this page to ensure we hit desktop breakpoint. | |
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
MIT License | |
Copyright (c) 2017 Antonio De Lucreziis | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
Kotlin is great for creating small command-line utilities, which can be packaged and distributed as normal JAR files. This short tutorial will show you how to:
The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here | |
is a short list of what I would need from a type system for it to be truely useful to me: | |
1) Full type inference. I would really prefer to be able to write: | |
(defn concat-names [person] | |
(assoc person :full-name (str (:first-name person) | |
(:second-name person)))) | |
And have the compiler know that whatever type required and produced from this function was acceptible as long as the |
/* | |
A small library that adds a template engine and a one way binding mechanism. All in 200 lines of code. | |
*/ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<meta charset="utf-8" /> | |
<script src="templating.js" type="text/javascript" charset="utf-8"></script> | |
</head> | |
<body> | |
<template id=t> |
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |