Skip to content

Instantly share code, notes, and snippets.

jitomesky

  • Japan
  • 日本
Block or report user

Report or block jitomesky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jitomesky
jitomesky / app.js
Created Aug 6, 2014
BBB_Temperature_sensor_web
View app.js
// BeagleBone Black + Grove Base Cape + Grove Temperature Sensor
// Base Cape: http://www.seeedstudio.com/wiki/Grove_Cape_for_BeagleBone_Series
// Temperature Sensor: http://www.seeedstudio.com/wiki/Grove_-_Temperature_Sensor
//
// Written by Toshifumi Nishinaga
// this code is public domain
var b = require('bonescript');
var getTemperature = function(){
@jitomesky
jitomesky / gifAnime2binImage.py
Last active Sep 19, 2017
GIFアニメ画像を2値化してArduino用のヘッダファイルを出力するプログラム
View gifAnime2binImage.py
# -*- coding: utf-8 -*-
import numpy as np
import cv2
from PIL import Image, ImageSequence, ImageDraw
import time
import unittest
import sys
# original code : http://playground.arduino.cc/Code/PCD8544
@jitomesky
jitomesky / rpi2.cfg
Created Apr 3, 2015
OpenOCD target config file for Raspberry Pi 2
View rpi2.cfg
# ref: http://www.raspberrypi.org/forums/viewtopic.php?f=72&t=100268
# : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0464f/ch10s06s01.html
adapter_khz 1000
adapter_nsrst_delay 400
reset_config none
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
@jitomesky
jitomesky / dhcp6c_pd_print.py
Created Jun 6, 2015
DHCPv6サーバーにIPv6 Prefixくれくれするスクリプト(注: まともなDHCPv6クライアントではないです.隔離環境で実行してください)
View dhcp6c_pd_print.py
import ipaddress
import sys
import socket
import os
# ref
# http://docs.python.jp/3/library/socket.html
def show_identifier(option):
@jitomesky
jitomesky / kadai3-1.py
Last active Jan 1, 2016
c29sdmUgcHJvZ3JhbSBmb3IgT1MgS2FkYWkzIFRvaTEtMQ==
View kadai3-1.py
import math
X = 0
C = [0, 10, 20, X]
T = [0, 50, 70, 300]
def inputs(t, td, j):
global T
@jitomesky
jitomesky / PIC12F509_LEDonTest.c
Created Oct 15, 2013
PIC12F509でGP2につなげたLEDを点灯するだけのサンプルです。 LEDはカソード側がGP2につながっています。 流れは #pragma configで初期設定→OPTIONの設定→TRIS(IOモード)の設定→GP2を0にセット こんなかんじです。 内蔵クロックはOSCCALで変更可能で、初期状態ではmaximumの4MHzとなっています。 コンパイラはXC8コンパイラを利用しました。
View PIC12F509_LEDonTest.c
#pragma config OSC = IntRC, WDT = OFF, MCLRE = OFF, CP = OFF
#if defined(__XC)
#include <xc.h> /* XC8 General Include File */
#elif defined(HI_TECH_C)
#include <htc.h> /* HiTech General Include File */
#endif
void main(void)
@jitomesky
jitomesky / clanton-standard.scc
Created Apr 11, 2014
fetch Intel Galileo kernel source
View clanton-standard.scc
define KMACHINE clanton
define KTYPE standard
define KARCH i386
kconf hardware clanton.cfg
View gentoo-systemd-emerge
$ sudo emerge -1 systemd util-linux
WARNING: One or more repositories have missing repo_name entries:
/usr/local/portage/local-overlay/profiles/repo_name
NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.
@jitomesky
jitomesky / dmesg
Last active Aug 29, 2015
btrfs_mount_failed
View dmesg
[ 0.000000] Linux version 3.18.12-gentoo (root@nightheron) (gcc version 4.8.4 (Gentoo 4.8.4 p1.6, pie-0.6.1) ) #1 SMP Thu Jun 4 06:18:47 UTC 2015
[ 0.000000] Command line: root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=gentoo.igz vga=791 BOOT_IMAGE=gentoo
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000dffeffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000dfff0000-0x00000000dfffffff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011fffffff] usable
You can’t perform that action at this time.