Skip to content

Instantly share code, notes, and snippets.

View japboy's full-sized avatar
🏠
WFH

Yu Inao / 稲尾 遊 japboy

🏠
WFH
View GitHub Profile
@japboy
japboy / fp.js
Created July 14, 2015 08:34
Study of Functional JavaScript
'use strict';
import _ from 'underscore';
export let splat = (func) => {
let x = (array) => func.apply(null, array);
return x;
};
export let unsplat = (func) => {
@japboy
japboy / error.coffee
Last active August 29, 2015 14:26
My subclass for Error class
'use strict'
global = global or window
###
Subclass for Error
@class
@extends global.Error
@see http://stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript
/**
* UTF-8 から SJIS に一括変換するスクリプト
*/
const fs = require('fs');
const glob = require('glob');
const iconv = require('iconv');
const pattern = './assets/**/*';
@japboy
japboy / bookmarklet.js
Last active August 10, 2017 15:31
Bookmarklet to copy image path from HTML elements
javascript:
/**
* WIP
*/
function copyToClipboard(text) {
const input = document.createElement('input');
input.style.position = 'fixed';
input.style.opacity = 0;
@japboy
japboy / .babelrc
Last active April 15, 2022 12:19
webpack DllPlugin + HappyPack sample
{
"presets": [
"stage-2",
[
"env", {
"modules": false,
"targets": {
"browsers": [
"Chrome >= 50",
"ChromeAndroid >= 50",
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Testing WebVR</title>
<meta name="viewport" content="width=device-width, user-scalable=yes">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/normalize.css">
<script defer src="https://unpkg.com/[email protected]/build/three.min.js"></script>
<script>
class WebVR {
@japboy
japboy / index.html
Last active February 14, 2018 14:28
Vue.js デモ
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Vue.js デモ</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/earlyaccess/sawarabimincho.css">
<style>
@japboy
japboy / slack.gs
Last active February 9, 2019 03:06
google app scripts
var SLACK_WEBHOOK_URL = 'https://hooks.slack.com/services/XXXXXXXXXX';
function onOpen() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [
{
name: 'Notify to Slack',
functionName: 'notify',
},
];
@japboy
japboy / index.html
Last active February 19, 2019 14:25
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>test</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style>
p {
text-align: center;
}
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Tinder?</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
<style>
body {
background-color: rgb(255, 255, 255);