Skip to content

Instantly share code, notes, and snippets.

View .vimrc-NeoBundle-Unite
" NeoBundle
" https://github.com/Shougo/neobundle.vim
" cf. http://qiita.com/puriketu99/items/1c32d3f24cc2919203eb
set nocompatible
filetype off
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#rc(expand('~/.vim/bundle/'))
endif
@hyuki0000
hyuki0000 / gemstring.c
Created February 13, 2014 23:43
《ジェムストリング問題》の参考プログラム
View gemstring.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int ar[] = { /* 1.41421356 */
1,
2, 2, 2, 2,
3,
4, 4, 4, 4,
5, 5,
@hyuki0000
hyuki0000 / verbatim.rb
Created February 22, 2014 07:44
An Octopress plugin that renders the given content 'as is'.
View verbatim.rb
# Input:
# {% verbatim tag:p %}
# $$a_1, a_2, a_3, \ldots$$
# {% endverbatim %}
#
# Output:
# <p>$$a_1, a_2, a_3, \ldots$$</p>
#
# Author: Hiroshi Yuki.
# Description: The content between {% verbatim %} and {% endverbatim %} would be rendered 'as is'.
@hyuki0000
hyuki0000 / sample.txt
Created February 28, 2014 00:25
Tiny Vim help file.
View sample.txt
*sample.txt*
sample.txt
*hyuki*
hyuki
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
@hyuki0000
hyuki0000 / hyuki-help.txt
Created February 28, 2014 00:57
Tiny Vim helpfile.
View hyuki-help.txt
*hyuki-help.txt*
ジャンプ <CTRL-]>
戻ってくる <CTRL-O>
|help-writing| ヘルプファイルの書き方
|hyuki-latex| LaTeX用メモ
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
View analyze1.rb
#!/usr/bin/ruby
def analyze(encrypted_hex)
guess = {
'CB' => ' ', # 'A',
'9C' => 'e', # 'B',
'BA' => 't', # 'C',
'DA' => 'o', # 'D',
'0D' => 's', # 'E',
'24' => 'n', # 'F',
@hyuki0000
hyuki0000 / lsnote.rb
Created April 18, 2014 01:01
lsnote.rb
View lsnote.rb
#! /usr/bin/ruby
# lsnote.rb
# カレントディレクトリ中の
# book-001.txt, book-002.txt, book-004.txt, book-005.txt
# teaching-003.txt, teaching-004.txt, teaching-005.txt, teaching-006.txt, teaching-009.txt
# writing-001.txt, writing-002.txt, writing-003.txt, writing-008.txt, writing-009.txt
# のようなファイルから、コーナー(book,teaching,writing)ごとに番号の最も大きなものを見つけ、
# タイムスタンプ順に表示する。
@hyuki0000
hyuki0000 / local_solve.rb
Created April 28, 2014 06:15
スペーストーキー問題の参照ファイルです。
View local_solve.rb
#! /usr/bin/ruby
class String
ALPHABET_LEN = 26
def encode
s = self
out = ''
while m = s.slice(/(.)\1*/)
c = m[0]
@hyuki0000
hyuki0000 / answer.txt
Last active August 29, 2015 14:01
チケットゴブル問題の参照ファイルです。
View answer.txt
62 Afghanistan Angola Antarctica Austria Azerbaijan Barbados Belarus Botswana Burundi Canada China Cyprus Denmark Ecuador Eritrea Ethiopia Finland Georgia Germany Ghana Greece Guadeloupe Jordan Kiribati Liberia Libya Liechtenstein Macao Malawi Malaysia Martinique Mongolia Montenegro Montserrat Myanmar Namibia Narnia Niger Nigeria Oman Palau Poland Portugal Romania Rwanda Samoa Senegal Serbia Seychelles Slovakia Slovenia Somalia Sudan Sweden Switzerland Tajikistan Tokelau Turkey Uganda Ukraine Zambia Zimbabwe
@hyuki0000
hyuki0000 / figren.rb
Created June 7, 2014 05:38
31foo.eps → 10foo.eps のようにファイル名変換するシェルスクリプトを生成するRubyスクリプト
View figren.rb
# 31foo.eps → 10foo.eps
# 35baa.eps → 30baa.eps
# のようにファイル名変換するシェルスクリプトを生成するRubyスクリプト
MAP = {
'31' => '10',
'32' => '10',
'33' => '20',
'34' => '20',
'35' => '30',