Skip to content

Instantly share code, notes, and snippets.

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 January 18, 2014 11:11
今年の日付を作るスクリプト
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";
}
}
" 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
《ジェムストリング問題》の参考プログラム
#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'.
# 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.
*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.
*hyuki-help.txt*
ジャンプ <CTRL-]>
戻ってくる <CTRL-O>
|help-writing| ヘルプファイルの書き方
|hyuki-latex| LaTeX用メモ
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
#!/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
#! /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
スペーストーキー問題の参照ファイルです。
#! /usr/bin/ruby
class String
ALPHABET_LEN = 26
def encode
s = self
out = ''
while m = s.slice(/(.)\1*/)
c = m[0]