Skip to content

Instantly share code, notes, and snippets.

Avatar

Taro Kobayashi 9re

View GitHub Profile
@9re
9re / camera.js
Created Mar 20, 2020
vernal equinox: 2 webcam + midi + shader study
View camera.js
import {initGLSLCode} from './glslcode';
const fragment = `#ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
uniform float scale;
@9re
9re / docker.rake
Created Dec 13, 2018
Rake command to sync files in host to container
View docker.rake
require 'docker'
require 'listen'
APP_NAME = 'hoge'
def retrieve_file(app_root, file)
dir = File.dirname(file)
container_dir = dir.to_s.sub(Regexp.new(app_root + '/'), '')
container_file = file.to_s.sub(Regexp.new(app_root + '/'), '')
return container_dir, container_file
@9re
9re / hello_shell.s
Last active Oct 27, 2016
execve('/system/bin/sh', {'/system/bin/sh', 0}, 0);
View hello_shell.s
// valid AArch64(ARMv8) assembly code.
// no data section, no null bytes but still not confirmed as valid shellcode.
// working in progress.
.text
.global _start
_start:
mov x1, xzr
mov x0, #0x732f
movk x0, #0x7379, lsl #0x10
movk x0, #0x6574, lsl #0x20
View remove-promoted-tweets.js
$('.promoted-tweet .js-action-dismiss').click();
View enable_rw_onsdcard.sh
# mount -o rw,remount rootfs /
# chmod 777 /mnt/sdcard
View crawl_tweets.js
(function() {
var tweets = [];
$('div.content').map(function(_,d){
d = $(d);
var img = d.find('img.js-action-profile-avatar')[0];
var screen_name = $(d.find('span.username > b')[0]).text();
var detail_url = $(d.find('small > a')[0]).attr('href');
detail_url = detail_url || "";
detail_url = detail_url.replace('/' + screen_name + '/status/', '');
var time = $(d.find('small > a > span')[0]).attr('data-time');
@9re
9re / index.html
Last active Jan 2, 2016
calculation of refraction
View index.html
<html>
<head>
<title>refract test</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<canvas width="465" height="465" id="world"></canvas>
<div class="input">
n1 : <input type="text" id="n1" value="1.000293" />
n2 : <input type="text" id="n2" value="1.333" />
@9re
9re / install_android_sdk.expect
Last active Dec 31, 2015
expect command file to install android sdk automatically
View install_android_sdk.expect
set timeout 3600
spawn android-sdk-macosx/tools/android update sdk -u
expect {
"Do you accept the license" {
send "y\n"
exp_continue
}
Downloading {
exp_continue
@9re
9re / modules.markdown
Created Dec 12, 2013
Documentation/kbuild/modules.txt
View modules.markdown

Building External Modules

This document describes how to build an out-of-tree kernel module.

=== Table of Contents

=== 1 Introduction
=== 2 How to Build External Modules
   --- 2.1 Command Syntax
   --- 2.2 Options