Skip to content

Instantly share code, notes, and snippets.

View readme.markdown

Where were you?

This tiny app ("Where were you?") saves your current position periodically in your browser's local storage.

  • This app is under construction.
  • The append button is for debug.
  • The clear button is to delete all records.
  • The register button register current position with a assigned name.

Plan

@hyuki0000
hyuki0000 / days.pl
Created Jan 18, 2014
今年の日付を作るスクリプト
View days.pl
use strict;
use warnings;
my @days = ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
for my $month (1..12) {
for my $day (1..$days[$month - 1]) {
print "2014/$month/$day\n";
}
}
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 Feb 13, 2014
《ジェムストリング問題》の参考プログラム
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 Feb 22, 2014
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 Feb 28, 2014
Tiny Vim help file.
View sample.txt
*sample.txt*
sample.txt
*hyuki*
hyuki
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
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',
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 Apr 28, 2014
スペーストーキー問題の参照ファイルです。
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]