Skip to content

Instantly share code, notes, and snippets.

View matsubara0507's full-sized avatar
:bowtie:
Working with Ruby

MATSUBARA Nobutada matsubara0507

:bowtie:
Working with Ruby
View GitHub Profile
@matsubara0507
matsubara0507 / amida-lottery.hs
Created November 6, 2015 05:46
Amida Lottery in Haskell (Sample Code)
import qualified Data.Map as Map
import Data.List
import Data.Tuple
type PermutationGroup = [Int]
type Cycle = [Int]
type Transposition = (Int,Int)
type CoxeterGenerator = [Transposition]
main = getLine >>= putStrLn . show . solve . (map read) . words
@matsubara0507
matsubara0507 / PunchedCardConverter.hs
Last active November 11, 2015 06:56
Encode and Decode to Text from Punched Card (Sample Code)
{-
Decode and Encode to Texts from Punched Card
This Program Use IBM 80-column punched card formats.
Bad this program has allowed any columns.
/
|] ]]]]]]]]]
| ] ]]]]]]]]]
| ] ]]]]]]]]]
| ] ] ] ]
@matsubara0507
matsubara0507 / lets_play_ctf.md
Last active November 17, 2015 02:39
IGGGで企画中の内部勉強会「Let's Play CTF」の資料

Let's Play CTF !


What is this?

  • IGGG企画の内部勉強会
  • CTFで体験してみよう!ぐらいのノリ
  • 私自身もほぼ初心者というコトに注意
  • 要するに楽しかったから広めたいぐらいの気持ち

@matsubara0507
matsubara0507 / Crypto.hs
Last active November 23, 2015 07:22
Functions for Crypto of CTF
module Crypto where
import Data.List
import Data.Char
import qualified Data.Map as Map
rot :: Int -> [Char] -> [Char]
rot n s = map (rot' (['a'..'z'] ++ ['A'..'Z'])) s
where
rot' alps c
@matsubara0507
matsubara0507 / land_of_haskell_2.md
Last active December 8, 2015 02:53
Land of Haskell #2

Land of Haskell #2 - Build Haskell -

What is This ?

IGGG Advent Calender 2015のために書いた記事です。
プログラミング言語Haskellを複数に分けて簡単にまとめてみました。
第2回はHaskellの基本構文についてです。
基本構文なんて、今更自分が話す必要はないのですが、以下が解ればコードを読めるので(出来るかわからないけど)今後Haskellの細かい話をするうえで便利なので、まとめておきます。

開発環境

Haskellの開発環境にはいくつか種類があります。

@matsubara0507
matsubara0507 / memo20160121.md
Created January 21, 2016 13:10
memo 2016.1.21

IGGG 会議 メモ

  • 2016/1/21
  • 部室

メモ

  • ひげ、概要を話す
  • トムにキム県からの意見が聞きたいと一蹴
  • キムケンが話し始める

キムケンの話

@matsubara0507
matsubara0507 / build_environment_of_ruby.md
Last active March 16, 2016 17:40
babunでWindowsにRuby環境を整えてみた

babunでWindowsにRuby環境を整えてみた

いきさつ

PCを新調したのでイロイロと環境構築を頑張る。
今回はRubyの環境構築。

OSはWindows10 64bit でUNIX環境をシミュレートするために babun (cugwin) を使ってみる。
(友人には仮想を使えと怒られた)

理想

@matsubara0507
matsubara0507 / advent_calendar_bot.gs
Last active December 1, 2016 13:53
ADVENTAR にあるアドベントカレンダーの更新をスクレイピングして更新を通知してくれる Slack Bot の GAS コード
function doPost(e) {
var prop = PropertiesService.getScriptProperties().getProperties();
const DAYS = [ '12/01', '12/02', '12/03', '12/04', '12/05'
, '12/06', '12/07', '12/08', '12/09', '12/10'
, '12/11', '12/12', '12/13', '12/14', '12/15'
, '12/16', '12/17', '12/18', '12/19', '12/20'
, '12/21', '12/22', '12/23', '12/24', '12/25'
];
@matsubara0507
matsubara0507 / minruby01.hs
Created December 7, 2016 16:02
二項演算だけパースする minruby パーサー
module MinRuby
( minrubyParse
, minrubyLoad
) where
import Control.Applicative (empty)
import Data.Either (either)
import Data.Tree (Tree(..))
import Text.Megaparsec (Parsec, Dec, parse, parseErrorPretty, some, string, space, (<|>))
import Text.Megaparsec.Char (digitChar)
@matsubara0507
matsubara0507 / comparison_of_chat_tools.md
Last active April 16, 2017 07:51
Comparison of Chat Tools

チャットツールの比較

現状 slack (free) を使ってるけど、他にいいの無いかなぁ...

feture slack(free) Discord(free)
過去ログ 10000件まで 無制限
ファイルのアップロード 全部で5GBまで 一回のアップロードが8MB
カスタム絵文字 使える 最大50個
ユーザーアカウント チームごとに別々 グローバルなアカウントがある