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
@rinx
rinx / h-luatexja.tex
Last active October 6, 2017 04:15
markdownで書いた文書をbeamerに変換するときのメモ
\usepackage{luatexja}
\hypersetup{unicode=true}
" *.md file read as markdown
au BufNewFile,BufRead *.md setlocal filetype=markdown
#!/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
#!/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
@rinx
rinx / gist:8928940
Last active August 31, 2016 16:32
黒い歴史を消して全部AA
for(var i=0; i< jq$(".column_odd_120").length; i++) jq$(".column_odd_120").attr("class","column_odd")
for(var i=0; i< jq$(".column_odd").length; i++) jq$(".column_odd > td:eq("+(5+i*8) +")").text("AA")
@rinx
rinx / predef.scss
Created February 18, 2014 14:50
reveal.js theme 'tricol'
/*
* predefined classes
*
* Copyright (C) 2013 Rintaro Okamura
*/
//mixin
$vendpf: -webkit-, -moz-, -ms-, -o-, '';
@rinx
rinx / gist:9614736
Last active August 29, 2015 13:57
学務情報システムの成績照会ページを開いてコンソールで実行 | あなたの落とした単位が降ってきます
tmp = "";
for(var i=0; i< jq$(".column_odd").length; i++){if( jq$(".column_odd > td:eq("+(i*8+5) +")").text().replace(/\s+/g, "") == "D" ){tmp += jq$(".column_odd > td:eq("+(i*8) +")").text().replace(/\s+/g, "") + ",";}}
for(var i=0; i< jq$(".column_odd_120").length; i++) tmp += jq$(".column_odd_120 > td:eq("+(i*8) +")").text().replace(/\s+/g, "") + ",";
function jumpPage(units) { location.href = "http://oboenikui.com/tani/?units=" + units.replace(/,$/,""); }
jumpPage(tmp);
@rinx
rinx / dokobasu.rb
Created March 26, 2014 03:33
どこバス仙台
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'net/http'
require 'kconv'
require 'nokogiri'
Net::HTTP.start('www.dokobasu.kotsu.city.sendai.jp', 80) {|http|
stop_s ="東北大川内キャンパス・萩ホール前"
type Graph = [[Int]]
data Node = Node { index :: Int,
prev :: Int,
cost :: Int,
flag :: Bool
} deriving Show
inf :: Int
inf = 10000
"filetype.vim
augroup filetypedetect
au BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux
augroup END