Windows10 Home
(環境によっては他のバージョンも適用されるかも
> node -v
Windows10 Home
(環境によっては他のバージョンも適用されるかも
> node -v
#!/bin/sh | |
npm i -g grunt-cli | |
npm i -g forever |
Next.js
Next.js Custom Server
https://github.com/kamiyam/typed-express-sample
mkdir project
cd project
npx express-generator src
"use strict" | |
mountFolder = (connect, point) -> | |
return connect.static(require('path').resolve(point)) | |
proxySnippet = require("grunt-connect-proxy/lib/utils").proxyRequest | |
module.exports = (grunt) -> | |
# configurable paths |
/* | |
* Accept control commands via USB. | |
* | |
* Commands start with '!' and end with '.' | |
* Commands have three parts: action, pin, value: !AAPPVV. | |
* | |
* E.g. '!01p101.' is DigitalWrite, Pin1, value = 1 | |
* | |
* Note: This is currently *very* crude. Much improvement could be made. | |
* I think the use of strncpy is eating a lot of memory. Refactor? |
Using D3 in a React TransitionGroup to transition elements. D3 is used purely for transitions, not for data joins. The distinction between entering and exiting elements is handled by the TransitionGroup component. See the React documentation for further information.
Alternative implementations only with D3 and using React without addons.
Note: This implementation is around 30% slower in processing 1000 circles than the other two.
# Socketer.coffee | |
do(w=window,d=document) -> | |
# ref http://qiita.com/Layzie/items/465e715dae14e2f601de | |
_is = (type, obj) -> | |
clas = Object.prototype.toString.call(obj).slice(8, -1) | |
return obj isnt undefined && obj isnt null && clas is type | |
# log output | |
log = -> |
do(w=window,d=document) -> | |
# log output | |
log = -> | |
if (typeof console isnt 'undefined') | |
console.log.apply(console, arguments); | |
## implements | |
class Singleton | |
constructor: ( name ) -> |
do ( d=document, w=window, $=jQuery ) -> | |
# ref http://qiita.com/Layzie/items/465e715dae14e2f601de | |
_is = (type, obj) -> | |
clas = Object.prototype.toString.call(obj).slice(8, -1) | |
return obj isnt undefined && obj isnt null && clas is type | |
# log output | |
log = -> | |
if (typeof console isnt 'undefined') |