Skip to content

Instantly share code, notes, and snippets.

Kosuke Kawahira binzume

View GitHub Profile
View aframe-click.html
<!DOCTYPE html>
<html>
<head>
<title>Click</title>
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@v1.0.4/dist/aframe-master.min.js"></script>
<script>
window.addEventListener('DOMContentLoaded', (ev) => {
let count = 0;
document.querySelector('#button').addEventListener('click', (ev) => {
@binzume
binzume / idb.sh
Created Dec 10, 2019
Command line tool to communicate with iOS device as like ADB
View idb.sh
#!/bin/bash
#
# Command line tool to communicate with iOS device as like ADB
# This is wrapper script for libimobiledevice and ios-deploy.
#
## Usage:
## idb [-s DEVID] [-b BUNDLE_ID] COMMAND [PARAMS...]
## idb devices
## idb logcat
## idb reboot
@binzume
binzume / dock2local.sh
Last active Jun 21, 2019
DockerfileあるのにVMに直接環境作りたくなったときに使うヤツ
View dock2local.sh
#!/bin/sh
# Apply a Dockerfile to local environment.
# usage: sudo ./dock2local.sh [PATH_TO_Dockerfile]
DOCKERFILE=${1:-Dockerfile}
DOCKERFILE=`dirname $DOCKERFILE`/`basename $DOCKERFILE`
LOCALDIR=$(cd `dirname $DOCKERFILE` && pwd)
D_WORKDIR=`pwd`
D_USER=`whoami`
@binzume
binzume / fix_bone.rb
Created Aug 30, 2015
mirror metasequoia bones
View fix_bone.rb
#!/usr/bin/env ruby
# -*- encoding: UTF-8 -*-
require 'rexml/document'
def fix_bone src_doc, mode = 'R'
if mode == 'R'
re = /(?<=_)R(?=\s|_|$)/
target = 'L'
elsif mode == 'L'
re = /(?<=_)L(?=\s|_|$)/
@binzume
binzume / erl-format.rb
Last active Dec 15, 2015
Erlangのコードのインデントをemacsっぽく調整する(仮)
View erl-format.rb
#!/usr/bin/env ruby
#
# emacs style erl formatter.
# usage: ruby erl-format.rb [-w] [target.erl]
#
save = false
if ARGV[0] == '-w'
save = true
ARGV.shift
end
@binzume
binzume / BMPLOAD.BAS
Created Feb 23, 2014
プログラミング始めたころに書いたコードが出てきたので晒す
View BMPLOAD.BAS
10 WIDTH 80,25:CONSOLE 0,25,0,1:COLOR 7,0,,,2:SCREEN 3,0,0,1:CLS 3
20 DIM R(15),G(15),B(15),C(255):ON HELP GOSUB *HLP.:HELP ON
30 RESTORE *CDATA.:FOR I=0 TO 15:READ R(I),G(I),B(I):NEXT:GOSUB *COL.
40 *MAIN'------------------------- MAIN -----------------------------
50 MS$(0)="PROGRAMED K.KAWAHIRA"
60 MS$(1)="画像データをロード"
70 MS$(2)="画像データをセーブ"
80 MS$(3)="画面のクリア"
90 MS$(4)="RDS"
100 MS$(5)="終了"
@binzume
binzume / gist:7005564
Created Oct 16, 2013
パーセプトロン
View gist:7005564
#include <iostream>
#include <string>
#include <sstream>
#include <stdlib.h>
typedef double value_t;
template<int N>
class Vec {
value_t d[N];
You can’t perform that action at this time.