Skip to content

Instantly share code, notes, and snippets.

View yuasatakayuki's full-sized avatar

Takayuki Yuasa yuasatakayuki

View GitHub Profile
@yuasatakayuki
yuasatakayuki / calculate_fermi_energy_of_white_dwarf.rb
Created January 20, 2016 10:55
Calculates Fermi energy of a white dwarf star using ruby-dimensional module
#!/usr/bin/env ruby
# Calculates the Fermi energy and temperature of a typical white dwarf star.
require "ruby-dimensional-standard"
require "ruby-dimensional-physics"
#define constants
G=Physics::Constant::GravitationalConstant
Msun=Physics::Constant::Msun
@yuasatakayuki
yuasatakayuki / flowchart_sample.html
Created January 28, 2016 12:27
テキスト形式でフローチャートを作図する例 - flowchart.js
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
<script src="raphael-min.js"></script>
<script src="flowchart-latest.js"></script>
@yuasatakayuki
yuasatakayuki / use_ruby_wrapper_of_spacewire_rmap_library.md
Last active February 15, 2016 01:38
User Ruby wrapper of SpaceWire/RMAP Library

Now users can use basic SpaceWire and RMAP functionalities of the library in the Ruby scripting language. Scripting capability allows developers to quickly iterate try-and-error loops on, for example, new SpaceWire device without compiling a test program.

The SWIG wrapper is already included in the Github repository of SpaceWire RMAP Library, and existing users can pull it by executing:

@yuasatakayuki
yuasatakayuki / open_source_spacewire_rmap_ip_cores.md
Created February 15, 2016 03:41
Open-source SpaceWire and SpaceWire-RMAP IP Cores
@yuasatakayuki
yuasatakayuki / the_open_source_space_project.md
Created February 15, 2016 03:48
The open-source SpaceWire project

Overview

SpaceWire is the standard data transfer and network interface which is standardized as ECSS-E-ST-50-12C lead by the European Space Agency (ESA). RMAP is a short for Remote Memory Access Protocol which is the standardized data transfer protocol over SpaceWire (ECSS-E-ST-50-52C).

#!/bin/bash
##############################################
#yum-related things
##############################################
sudo yum update
sudo yum groupinstall -y "GNOME Desktop" "Graphical Administration Tools" "Console Internet Tools" "Scientific Support" "Development Tools" "System Administration Tools"
sudo yum install -y zsh
sudo yum install -y openssl-devel readline-devel zlib-devel curl-devel expat expat-devel ImageMagick ImageMagick-devel bzip2-devel python-devel ruby-devel
sudo yum install -y dbus-python-devel.x86_64 gstreamer-python-devel.x86_64 lvm2-python-libs.x86_64 python-backports-lzma.x86_64 python-brlapi.x86_64
#!/bin/bash
PREFIX=$HOME/work/install
cd $HOME
if [ ! -d $PREFIX ]; then
mkdir -p $PREFIX
fi
#!/bin/bash
PREFIX=$HOME/work/install
cd $HOME
if [ ! -d $PREFIX ]; then
mkdir -p $PREFIX
fi
####### CMakeLists.txt for RubySpaceWire
cmake_minimum_required(VERSION 2.8)
### Initial definition of cmake variables
set(CMAKE_INSTALL_PREFIX $ENV{HOME} CACHE PATH "install prefix")
set(CMAKE_BUILD_TYPE Release CACHE STRING "build type")
set(CMAKE_CXX_FLAGS_DEBUG "-g -W -Wall" CACHE STRING "CXX_FLAGS for debug")
set(CMAKE_C_FLAGS_DEBUG "-g -W -Wall" CACHE STRING "C_FLAGS for debug")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -W -Wall" CACHE STRING "CXX_FLAGS for release")
### CreateSwigRuby
### 2013-06-02 | Hirokazu Odaka
###
### message
message("-- CreateSwigRuby: ${TARGET_EXT_LIBRARY}")
message("-- SWIG interface file: ${SWIG_IF_FILE}")
message("-- INCLUDE_DIRS: ${RUBY_EXT_INCLUDE_DIRS}")
message("-- LIBRARY_DIRS: ${RUBY_EXT_LIBRARY_DIRS}")
message("-- LIBRARIES: ${RUBY_EXT_LIBRARIES}")