Skip to content

Instantly share code, notes, and snippets.

@MSakamaki
MSakamaki / DragAndDropEmulate.js
Last active August 29, 2015 14:21
テスト用コード@ドラッグ&ドロップのファイル版 Drag And Drop Api for File
var ary_u8 = new Uint8Array([0x30,0x82,0x06,....]); // byte code
var file = new File([ary_u8], 'file name', {
lastModified: new Date(0),
type: "application/json"
});
var dispatchDrop = function(ary_u8){
var createEvent= function(type) {
var event = document.createEvent("CustomEvent");
event.initCustomEvent(type, true, true, null);
@MSakamaki
MSakamaki / gruntfile.js
Created April 25, 2015 05:44
grunt injector
injector: {
options: {
// Task-specific options go here.
},
scripts: {
options: {
transform: function(filePath) {
filePath = filePath.replace('/app/', '');
filePath = filePath.replace('/.tmp/', '');
return '<script src="' + filePath + '"></script>';
@MSakamaki
MSakamaki / README.md
Created April 25, 2015 02:48
Angularハンズオン

ハンズオン

# 環境初期構築
npm i -g yo bower grunt-cli
# generatorのインストール
npm i -g generator-webapp
# yo コマンドでアプリ開発開始
@MSakamaki
MSakamaki / 00_README.md
Last active August 29, 2015 14:18
Google App Scriptメモ

Google App Scriptメモ

@MSakamaki
MSakamaki / README.md
Last active August 29, 2015 14:18
Machine Learning
@MSakamaki
MSakamaki / a.csv
Last active August 29, 2015 14:18
sample.csv
name value
A 100
B 200
C 250
D 300

neobundle install

mkdir -p ~/.vim/bundle
git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim
@MSakamaki
MSakamaki / 00_README.md
Last active August 29, 2015 14:17
protractor memo
@MSakamaki
MSakamaki / hats.on.01.js
Last active August 29, 2015 14:16
FxOSハンズオン
We couldn’t find that file to show.
@MSakamaki
MSakamaki / WSconnect.js
Created February 23, 2015 02:42
WebSocket Test
var wsx = new WebSocket('ws://' + location.host);
wsx.onopen = function(e){console.log('onopen',e);};
wsx.onmessage = function(e){console.log('onmessage',e)};
wsx.onclose = function(e){console.log('onclose',e)};
wsx.onerror = function(e){console.log('onerror',e)};