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 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 / README.md
Last active November 23, 2021 23:35
Windows npm install時のエラー解決

環境

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

Node.js インストール

https://nodejs.org/en/

確認

> node -v
@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 / uploader.coffee
Created September 26, 2014 10:31
File Upload form data multiple for Angular
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 August 29, 2015 14:00
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
grunt.initConfig
@kamiyam
kamiyam / Gruntfile.coffee
Created April 26, 2014 07:39
Gruntfile for Node.js Framework Express
"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 March 20, 2014 04:59
Here are some things you can do with Gists in GistBox.
// 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 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 = ->