Skip to content

Instantly share code, notes, and snippets.

View nwtgck's full-sized avatar
:octocat:
Feel free to make my English natural by native speakers

Ryo Ota nwtgck

:octocat:
Feel free to make my English natural by native speakers
View GitHub Profile
Sorted Bluetooth's MAC Addresses
[
"00:06:66:7D:B9:A9",
"00:06:66:7D:B9:E2",
"00:06:66:7D:B9:E9",
"00:06:66:7D:BD:C5",
"00:06:66:7D:C1:16"
]
@nwtgck
nwtgck / new-window.md
Last active April 2, 2017 07:21
New Window
// How to run
// cd <root which has pom.xml>
// scala PomToSbt.scala
// Then, you have output
object PomToSbt extends App{
// (from: https://stackoverflow.com/a/15430347/2885946)
import scala.xml._
[elvm]$ make -k scala
Skip building js due to lack of nodejs
Skip building asmjs due to lack of nodejs
Skip building cl due to lack of sbcl
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Skip building cs due to lack of
Skip building i due to lack of ick
Skip building forth due to lack of gforth
[elvm]$ make test-hs
Skip building js due to lack of nodejs
Skip building asmjs due to lack of nodejs
Skip building cl due to lack of sbcl
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Skip building cs due to lack of
Skip building i due to lack of ick
Skip building forth due to lack of gforth
s = <<EOS
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NamedFieldPuns #-}
import Data.Array.IO
import Data.IORef
import Data.Char
import Data.Bits
import System.Exit
import Control.Exception
main :: IO ()
main = do
aRef <- newIORef 0 :: IO (IORef Int)
@nwtgck
nwtgck / README.md
Created May 10, 2018 23:05 — forked from shimizu/README.md
Summer Wars - World Clock -

サマーウォーズのアレです。

# (from: http://melborne.github.io/2013/08/30/monkey-patching-for-prudent-rubyists/)
class Array
alias :get_at :[]
private :get_at
alias :set_at :[]=
private :set_at
def in_bound?(idx)
0 <= idx && idx < self.size