Skip to content

Instantly share code, notes, and snippets.

View kamiyam's full-sized avatar
🏠
Working from home

kamiyam kamiyam

🏠
Working from home
View GitHub Profile
@kamiyam
kamiyam / README.md
Last active November 23, 2021 23:35
Windows npm install時のエラー解決

環境

Windows10 Home
(環境によっては他のバージョンも適用されるかも

Node.js インストール

https://nodejs.org/en/

確認

> node -v
@kamiyam
kamiyam / install.sh
Created September 16, 2013 04:52
npm scripts preinstall Example...
#!/bin/sh
npm i -g grunt-cli
npm i -g forever
@kamiyam
kamiyam / Readme.md
Last active June 25, 2020 12:42
Next.js and Custom Server
@kamiyam
kamiyam / README.md
Last active April 20, 2018 12:01
migrate express js2ts
@kamiyam
kamiyam / Gruntfile.coffee
Last active August 13, 2016 12:56
Grunt on CakePHP
"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
@kamiyam
kamiyam / ds-duino.ino
Created June 27, 2016 00:10 — forked from dougalcampbell/ds-duino.ino
Digispark and nodejs - talking to the Digispark Arduino-compatible microcontroller via USB with the node-hid library
/*
* 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?
@kamiyam
kamiyam / README.md
Created May 1, 2016 16:49 — forked from jstcki/README.md
Transitions with React and D3 II

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.

@kamiyam
kamiyam / Socketer.coffee
Last active January 2, 2016 18:59
Sails.js Socket.io event implements on Client & Server Side
# 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 = ->
@kamiyam
kamiyam / Singleton.coffee
Last active January 2, 2016 16:49
Always the only instance
do(w=window,d=document) ->
# log output
log = ->
if (typeof console isnt 'undefined')
console.log.apply(console, arguments);
## implements
class Singleton
constructor: ( name ) ->
@kamiyam
kamiyam / app.coffee
Last active January 1, 2016 12:19
socket.io mluti connecting room for sails.js
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')