This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// #関数定義 | |
// fun [関数名] ( [引数名1]:[型], [引数名2]:[型] ... ): [返り値型] { [式] } | |
fun addOne(num: Int): Int { | |
num+1 | |
} | |
// fun [関数名] ( [引数名1]:[型], [引数名2]:[型] ... ): [返り値型] = { [式] } | |
fun addOne(num: Int): Int = num+1 | |
// 返り値の型が自明な場合は省略可(可読性下がるため非推奨) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void put_restr(char *st) | |
{ | |
int i,j=0; | |
while(*(st+j) != '\0') j++; | |
// "abc"が渡された場合、ここでjは3 | |
// *(st+0) == a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://tenki.jp/forecast/1/4/2300/1202/ > /tmp/html 2>/dev/null | |
tenki=$(cat /tmp/html | grep 'weather-telop' | head -n 1 | sed 's/ *<[^>]*>//g') | |
degree_max_today=$(cat /tmp/html | grep 'high-temp temp' | head -n 1 | sed -e 's/ *<[^>]*>//g') | |
degree_min_today=$(cat /tmp/html | grep 'low-temp temp' | head -n 1 | sed -e 's/ *<[^>]*>//g') | |
rain_prob_q1=$(cat /tmp/html | grep -A 5 'rain-probability' | head -n 3 | tail -n 1 | sed 's/ *<[^>]*>//g') | |
rain_prob_q2=$(cat /tmp/html | grep -A 5 'rain-probability' | head -n 4 | tail -n 1 | sed 's/ *<[^>]*>//g') | |
rain_prob_q3=$(cat /tmp/html | grep -A 5 'rain-probability' | head -n 5 | tail -n 1 | sed 's/ *<[^>]*>//g') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export JONOUCHI_DEATH="城之内" | |
export JONOUCHI_WHO1="舞" | |
export JONOUCHI_WHO2="遊戯" | |
export JONOUCHI_WHO3="マリク" | |
export JONOUCHI_LIFE="ライフ" | |
echo "お願い、死なないで${JONOUCHI_DEATH}!あんたが今ここで倒れたら、${JONOUCHI_WHO1}さんや${JONOUCHI_WHO2}との約束はどうなっちゃうの? ${JONOUCHI_LIFE}はまだ残ってる。ここを耐えれば、${JONOUCHI_WHO3}に勝てるんだから!\n\n次回「${JONOUCHI_DEATH}死す」。デュエルスタンバイ!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% uname -a | |
Linux ohagi 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017 x86_64 GNU/Linux | |
% ruby -v | |
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux] | |
% gem -v | |
2.6.11 | |
% gem list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
mkdir ${1} | |
cd ${1} | |
# 読み込み | |
cdrdao read-cd --with-cddb --cddb-servers "freedbtest.dyndns.org:/~cddb/cddbutf8.cgi" --datafile ${1}.bin ${1}.toc | |
cueconvert -i toc -o cue ${1}.toc ${1}.tmp | |
# 文字化け回避(これでも文字化けするときは自力でなんとかする) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "\n\nLT list\n"; echo {member1,member2,member3,member4} | sed -e 's/ /\n/g' | sort -R | xargs echo-sd --stress | sed -e 's/ / /g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://bitbucket.org/bitvisor/bitvisor/downloads/ からダウンロード & 解凍 | |
# pacman -S community/mingw-w64-gcc extra/mercurial community/libnewt | |
cd [解凍したbitvisor] | |
$ make | |
$ cd boot/uefi-loader | |
$ make |
NewerOlder