Skip to content

Instantly share code, notes, and snippets.

View sifyfy's full-sized avatar

Sifi Takashina sifyfy

View GitHub Profile
#!/bin/bash -e
# 指定ファイル末尾の余分な改行文字を取り除いた文字列を出力
cat $1 | ruby -0777 -ne 'puts $_.chomp("")'
[-1 * -1 = 1]
-1 * -1 = -1 * -1 + 0 + 0
= -1 * -1 + (1 + -1) + (1 + -1)
= -1 * -1 + -1 + -1 + 1 + 1
= -1 * (-1 + 1 + 1) + 1 + 1
= -1 * 1 + 1 + 1
= -1 + 1 + 1
= 0 + 1
= 1
@sifyfy
sifyfy / ghc-mod.cmd
Created May 23, 2016 13:12
Haskell tools wrappers for Windows.
@echo off
setlocal
chcp 65001 > nul
call "%APPDATA%\local\bin\ghc-mod.exe" %*
endlocal
(function(){ alert("(/・ω・)/"); })();
@powershell -command "Start-Process -Verb runas notepad C:\WINDOWS\System32\drivers\etc\hosts"
#!/bin/bash -e
RUST_DIR=$HOME/.rust
rustup update
if [ ! -d $RUST_DIR ]; then
mkdir $HOME/.rust
fi
@sifyfy
sifyfy / Cargo.toml
Last active April 23, 2016 12:56
rust-sorty example
[package]
省略
[features]
default = []
check = ["sorty"]
[dependencies]
sorty = { git = "https://github.com/Wafflespeanut/rust-sorty", optional = true }
.DS_Store
.directory
Thumbs.db
core
*.swp
*~
*.bak
*.log
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
#!/bin/bash -eu
AUTO_START_DIR=${HOME}/.config/autostart
KEYRING_CONFIG=gnome-keyring-ssh.desktop
if [ ! -d $AUTO_START_DIR ]; then
mkdir -p $AUTO_START_DIR
fi
if [ ! -e ${AUTO_START_DIR}/${KEYRING_CONFIG} ]; then