Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

kamiyam kamiyam

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

環境

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

Node.js インストール

https://nodejs.org/en/

確認

> node -v
@kamiyam
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
kamiyam / README.md
Created May 1, 2016 — forked from herrstucki/README.md
Transitions with React and D3 II
View README.md

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 / uploader.coffee
Created Sep 26, 2014
File Upload form data multiple for Angular
View uploader.coffee
do(d=document)->
app = angular.module myApp, []
app.controller "uploadCtrl", ["$scope", "$http", ($scope, $http)->
$scope.$data = {
userId: "ID"
userName: "USER_NAME"
userMail: "sample@example.com"
receiveMail: "sample@example.com"
downloadPassword: "hogehoge"
@kamiyam
kamiyam / Gruntfile.coffee
Last active Aug 29, 2015
Grunt - Middleman Cooperation
View Gruntfile.coffee
module.exports = (grunt)->
pkg = grunt.file.readJSON 'package.json'
for taskName of pkg.devDependencies
if taskName.substring(0,6) == 'grunt-'
grunt.loadNpmTasks taskName
grunt.initConfig
@kamiyam
kamiyam / Gruntfile.coffee
Created Apr 26, 2014
Gruntfile for Node.js Framework Express
View Gruntfile.coffee
"use strict"
LIVERELOAD_PORT = 35729
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
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
kamiyam / Socketer.coffee
Last active Jan 2, 2016
Sails.js Socket.io event implements on Client & Server Side
View Socketer.coffee
# 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 = ->
You can’t perform that action at this time.