Skip to content

Instantly share code, notes, and snippets.

View rinx's full-sized avatar
🍵
Drinking sencha all the time

Rintaro Okamura rinx

🍵
Drinking sencha all the time
View GitHub Profile
#!/bin/sh
xrandr | grep "1229x922"
if [ $? -eq 0 ]; then
xrandr --output LVDS1 --scale 1x1 --panning 1024x768
else
xrandr --output LVDS1 --scale 1.2x1.2 --panning 1229x922
fi
#!/bin/sh
wget -N https://gist.github.com/rinx/35bdb3af7c08a546b14f/raw/fortran.vim -P $HOME/.vim/ftplugin/fortran > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo -e "\033[0;32m✔ \033[1;35mA Vim filetype plugin $HOME/.vim/ftplugin/fortran/fortran.vim downloaded\033[00m" | sed "s/^-e //"
else
echo -e "\033[0;31m✗ \033[1;31mA Vim filetype plugin $HOME/.vim/ftplugin/fortran/fortran.vim downloading failed\033[00m" | sed "s/^-e //"
fi
wget -N https://gist.github.com/rinx/5018808/raw/python.vim -P $HOME/.vim/ftplugin/python > /dev/null 2>&1
" *.md file read as markdown
au BufNewFile,BufRead *.md setlocal filetype=markdown
@rinx
rinx / h-luatexja.tex
Last active October 6, 2017 04:15
markdownで書いた文書をbeamerに変換するときのメモ
\usepackage{luatexja}
\hypersetup{unicode=true}
#!/usr/bin/env ruby
#-*- coding: utf-8 -*-
require 'twitter'
# --- define consts ---
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_TOKEN = ''
setl conceallevel=0
@rinx
rinx / letters.txt
Last active January 1, 2016 23:48
なんかかわいい文字たち
🔙
@rinx
rinx / Makefile
Last active January 1, 2016 23:48
Makefile template for lualatex document
#
# Makefile template for lualatex document
#
# Please set target name
target=name
OS=${shell uname}
$(target).pdf: lualatex.fmt $(target).tex
lualatex $(target).tex
#!/bin/sh
for i in {0..255}
do
printf "\x1b[38;5;${i}m%03d " ${i}
done
printf "\n"
@rinx
rinx / TBI-with-d.hs
Last active December 26, 2015 23:49
薄膜干渉のシミュレーションするやつ
{-
波長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]