Skip to content

Instantly share code, notes, and snippets.

View oyakodon's full-sized avatar

Oyakodon oyakodon

View GitHub Profile
@oyakodon
oyakodon / Calculation.cs
Created December 12, 2015 03:40
デレステのアピール値やスコアの計算メソッドをまとめたもの
using System;
namespace CGSS_Calc
{
/// <summary>
/// デレステのアピール値やスコアの計算メソッドをまとめたもの
/// 参考 : http://imascg-slstage-wiki.gamerch.com/%E3%82%A2%E3%83%94%E3%83%BC%E3%83%AB%E5%80%A4%E8%A8%88%E7%AE%97
/// http://imascg-slstage-wiki.gamerch.com/%E3%82%B9%E3%82%B3%E3%82%A2%E8%A8%88%E7%AE%97
/// 式 :
/// アピール値 = { (素のステータス) × (100 + 発揮される効果の和:単位%) × 0.01} の小数点以下を切り上げたもの ←Calc_Api [support = false]
@oyakodon
oyakodon / html2md.sh
Created December 12, 2015 03:45
HTMLをMarkdown形式に変換するシェルスクリプト(適当)
#!/bin/bash
# Author : Oyakodon
# Summary : HTMLをMARKDOWNに変換する
# Expected Dir Tree : |-hoge.html
# |-html2md.sh
# |-md[dir]
# Usage : html2md.sh [HTML-FILENAME]
# 引数チェック
@oyakodon
oyakodon / Search_Algo_Compare.cs
Created December 12, 2015 03:49
自作探索プログラムで探索アルゴリズムを比較する。(コンソールアプリケーション / C#)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Search_Algo_Compare
{
/// <summary>
/// 自作探索プログラムで探索アルゴリズムを比較する。
@oyakodon
oyakodon / Hanoi.cs
Last active January 8, 2016 08:41
ハノイの塔を解きます。 / C#
using System;
namespace Hanoi
{
class Program
{
static void Main(string[] args)
{
int num;
Console.WriteLine("- ハノイの塔 -");
@oyakodon
oyakodon / ABC032_A.cs
Created January 9, 2016 13:59
ABC032で実際に打ったプログラム / C#
using System;
class Program
{
static void Main(string[] args)
{
var a = int.Parse(Console.ReadLine());
var b = int.Parse(Console.ReadLine());
var n = int.Parse(Console.ReadLine());
var i = n;
@oyakodon
oyakodon / ABC033_A.cs
Created February 8, 2016 14:11
ABC033で実際に使ったプログラムたち。
using System;
namespace ABC033
{
public class A
{
public static void Main(string[] args)
{
var input = Console.ReadLine();
Console.WriteLine(checker(input) ? "SAME" : "DIFFERENT");
@oyakodon
oyakodon / rajiru.sh
Created February 13, 2016 11:47
ラズパイでらじる★らじるを聞く。 / bash
#!/bin/bash
# https://gist.github.com/soramugi/836952a6b09e540eb6a3 を参考に
# https://gist.github.com/matchy2/f03205246e1a12b3b027 をRaspberry Pi仕様にしました。
LANG=ja_JP.utf8
pid=$$
wkdir='/var/tmp'
playerurl="http://www3.nhk.or.jp/netradio/files/swf/rtmpe_ver2015.swf"
date=`date +%Y%m%d_%H%M`
@oyakodon
oyakodon / index.php
Created February 13, 2016 11:49
ラジオをブラウザから操作する / php & html & jquery
<?php
$content="";
if(isset($_GET["id"])){
$id = $_GET["id"];
switch ($id) {
case "stop":
exec("nohup /usr/bin/killall mplayer > /dev/null &");
$content="再生を停止しました。";
break;
@oyakodon
oyakodon / jiho.sh
Last active February 25, 2016 06:49
時報シェルスクリプト / Bash & AquesTalkPi
#!/bin/bash
# http://oykdn.hatenablog.com/entry/2016/02/24/231148
# <ゆっくりに時刻を言わせる>
HOUR=`date '+%l' | tr -d ' '` # 時刻の取得
AMPM=`date '+%p'` # 午前 or 午後
# 午前か午後かで分岐
if [ $AMPM = "AM" ]; then
AMPM="ごぜん"
@oyakodon
oyakodon / location_result.dat
Created March 3, 2016 13:12
天気予報を取得する / Python / Python weather API
# 2016-3-3 現在のYahooの地域コードデータです
# N/Aの行は削除しています
# 出力スクリプト参考:http://inside-my-box.hatenablog.com/entry/2014/07/21/001606
location ID Name Geodata(lat,long)
JAXX0001 Akita 39.72,140.1
JAXX0002 Akune 32.02,130.2
JAXX0003 Amagasaki 34.72,135.42
JAXX0004 Aomori 40.82,140.75
JAXX0005 Asahikawa 43.77,142.37