This file contains hidden or 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
main :: IO() | |
main = mapM_ print $ prime 10000 | |
prime :: Int -> [Int] | |
prime n = primeList [2..n] | |
where | |
primeList [] = [] | |
primeList (x:xs) = x:primeList [ y | y <- xs, y `mod` x /= 0 ] | |
This file contains hidden or 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
-- othello.hs | |
-- | |
-- To run... | |
-- Prelude> control initialBoard initialTurn | |
-- | |
-- controls... | |
-- cursor keys => move cursor | |
-- Z key => put stones | |
-- P key => pass the turn | |
-- Q key => quit |
This file contains hidden or 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/sh | |
# | |
# convert markdown to reveal.js via pandoc | |
# | |
# this script requires... | |
# git, pandoc | |
# | |
# Usage... | |
# $ markdown2reveal -o output.html input.md |
This file contains hidden or 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 | |
# This script gets weather charts from www.jma.go.jp | |
DIRNM=`date +"WC_%Y%m%d_%I%M"` | |
mkdir -p ${DIRNM} | |
cd ${DIRNM} | |
# -- asas,fsas24,fsas48 | |
wget http://www.jma.go.jp/jp/g3/images/asia/pdf/asas.pdf >> log 2>&1 && echo "asas downloaded successfully!" |
This file contains hidden or 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
{- | |
波長lambdaは380nm-1500nm程度として計算する。 | |
媒質の屈折率n1は1.5として考える。 | |
-} | |
import System.IO | |
main :: IO () | |
main = mapM_ simulate [0.1,0.3,0.4,0.5,0.6,0.7,1.0] |
This file contains hidden or 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/sh | |
for i in {0..255} | |
do | |
printf "\x1b[38;5;${i}m%03d " ${i} | |
done | |
printf "\n" |
This file contains hidden or 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
# | |
# Makefile template for lualatex document | |
# | |
# Please set target name | |
target=name | |
OS=${shell uname} | |
$(target).pdf: lualatex.fmt $(target).tex | |
lualatex $(target).tex |
This file contains hidden or 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
✔ | |
✗ | |
🔙 | |
⎇ |
This file contains hidden or 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
setl conceallevel=0 |
This file contains hidden or 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/env ruby | |
#-*- coding: utf-8 -*- | |
require 'twitter' | |
# --- define consts --- | |
CONSUMER_KEY = '' | |
CONSUMER_SECRET = '' | |
ACCESS_TOKEN = '' |