Skip to content

Instantly share code, notes, and snippets.

Working from home

kamiyam kamiyam

Working from home
View GitHub Profile
kamiyam /
Last active Apr 20, 2018
migrate express js2ts
kamiyam /
Last active Jul 7, 2020
Windows npm install時のエラー解決


Windows10 Home

Node.js インストール


> node -v
kamiyam / ds-duino.ino
Created Jun 27, 2016 — forked from dougalcampbell/ds-duino.ino
Digispark and nodejs - talking to the Digispark Arduino-compatible microcontroller via USB with the node-hid library
View ds-duino.ino
* 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 /
Created May 1, 2016 — forked from herrstucki/
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 /
Created Sep 26, 2014
File Upload form data multiple for Angular
app = angular.module myApp, []
app.controller "uploadCtrl", ["$scope", "$http", ($scope, $http)->
$scope.$data = {
userId: "ID"
userName: "USER_NAME"
userMail: ""
receiveMail: ""
downloadPassword: "hogehoge"
kamiyam /
Last active Aug 29, 2015
Grunt - Middleman Cooperation
module.exports = (grunt)->
pkg = grunt.file.readJSON 'package.json'
for taskName of pkg.devDependencies
if taskName.substring(0,6) == 'grunt-'
grunt.loadNpmTasks taskName
kamiyam /
Created Apr 26, 2014
Gruntfile for Node.js Framework Express
"use strict"
proxySnippet = require("grunt-connect-proxy/lib/utils").proxyRequest
mountFolder = folderMount = (connect, base) ->
connect["static"] require("path").resolve(base)
listen = 8000
server = 3000
module.exports = (grunt) ->
kamiyam / 0_reuse_code.js
Created Mar 20, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
kamiyam /
Last active Jan 2, 2016
Sails.js event implements on Client & Server Side
do(w=window,d=document) ->
# ref
_is = (type, obj) ->
clas =, -1)
return obj isnt undefined && obj isnt null && clas is type
# log output
log = ->
You can’t perform that action at this time.