Skip to content

Instantly share code, notes, and snippets.

<!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 December 10, 2019 10:30
Command line tool to communicate with iOS device as like ADB
#!/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 June 21, 2019 09:45
DockerfileあるのにVMに直接環境作りたくなったときに使うヤツ
#!/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 August 30, 2015 11:41
mirror metasequoia bones
#!/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 December 15, 2015 15:06
Erlangのコードのインデントをemacsっぽく調整する(仮)
#!/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 February 23, 2014 18:16
プログラミング始めたころに書いたコードが出てきたので晒す
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 October 16, 2013 10:10
パーセプトロン
#include <iostream>
#include <string>
#include <sstream>
#include <stdlib.h>
typedef double value_t;
template<int N>
class Vec {
value_t d[N];