Skip to content

Instantly share code, notes, and snippets.

View zaki50's full-sized avatar

Makoto Yamazaki zaki50

View GitHub Profile
@zaki50
zaki50 / cpuinfo_of_vono7elf.txt
Created January 31, 2012 00:54
/proc/cpuinfo of Vono 7 Elf
root@android:/ # cat /proc/cpuinfo
Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 1001.88
Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2
@zaki50
zaki50 / parts.txt
Created November 5, 2011 02:30
まごろくさんにとりあえず買っておくとよいと言われたパーツ一覧
 1.1/4Wカーボン抵抗 全部入り(73種類0Ω付)
  価格:¥5,700 × 数量:1 = 合計:¥5,700
 2.絶縁型ラジアルリードタイプ積層セラミックコンデンサー0.01μF50V±10%5mmピッチ(10個入)
  価格:¥100 × 数量:3 = 合計:¥300
(1パックの場合は¥100円/100パック以上の場合は単価¥36円)
 3.電解コンデンサー100μF25V85℃(ルビコンYK)
  価格:¥10 × 数量:10 = 合計:¥100
 4.低損失三端子レギュレーター[3.3V1A]TA48033S
  価格:¥100 × 数量:10 = 合計:¥1,000
 5.三端子レギュレーター [5V1A] NJM7805FA(5個入)
@zaki50
zaki50 / RCS620S_port_selectable.diff
Created October 30, 2011 09:11
arduino-RCS620S.zip が使用するシリアルポートを変更可能にする修正です。
diff --git a/firmware/RCS620S/RCS620S.h b/firmware/RCS620S/RCS620S.h
index 9792859..f2a17c0 100644
--- a/firmware/RCS620S/RCS620S.h
+++ b/firmware/RCS620S/RCS620S.h
@@ -16,6 +16,15 @@
#define RCS620S_MAX_CARD_RESPONSE_LEN 254
#define RCS620S_MAX_RW_RESPONSE_LEN 265
+
+/*
@zaki50
zaki50 / gist:1142068
Created August 12, 2011 13:49
copyOf.java
public static <T> T[] copyOf(T[] orig) {
if (orig == null) {
return null;
}
@SuppressWarnings("unchecked")
T[] newArray = (T[]) Array.newInstance(orig.getClass().getComponentType(), orig.length);
System.arraycopy(orig, 0, newArray, 0, orig.length);
return newArray;
}
@zaki50
zaki50 / gist:1062685
Created July 3, 2011 22:39
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@zaki50
zaki50 / gist:1061801
Created July 2, 2011 23:57
random_dithering.java
final int p = pixels[i];
final int r = Color.red(p);
final int g = Color.green(p);
final int b = Color.blue(p);
final int y = g * 587 / 1000 + r * 299 / 1000 + b * 114 / 1000;
int yb = (y < rand.nextInt(256)) ? 0 : 255;
package org.zakky.rpn;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Stack;
import java.util.concurrent.TimeUnit;
public class Main {
@zaki50
zaki50 / rpn
Created June 26, 2011 06:23
Main.java
package org.zakky.rpn;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Stack;
public class Main {
public static void main(String[] args) throws Exception {
final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
@zaki50
zaki50 / gist:1034403
Created June 19, 2011 15:18
config_xperia_arc.txt
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.9
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
@zaki50
zaki50 / gist:1034022
Created June 19, 2011 09:51
XLarge判定
(context.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
== Configuration.SCREENLAYOUT_SIZE_XLARGE