Skip to content

Instantly share code, notes, and snippets.

@tetu1225
tetu1225 / app.rb
Created July 18, 2011 06:00
Sinatraで画像ファイルをアップロードして表示する
require 'sinatra'
require 'haml'
# 静的コンテンツ参照のためのパス設定
set :public, File.dirname(__FILE__) + '/public'
# アップロード
get '/' do
haml :index
@soh-i
soh-i / gist:3754778
Created September 20, 2012 09:01
Numbers.appの変なCSVをまともなTSVにエクスポートする
#!/usr/bin/env perl -w
use strict;
# Convert CSV file that exported by Apple Numbers.app to TSV
my $file = shift || die;
open my $fh, '<', $file || die;
while ( my $entry = <$fh> ) {
@rummelonp
rummelonp / percol_zsh.md
Created December 7, 2012 15:57
percol 入れて zsh と組み合わせたら超便利

percol 入れて zsh と組み合わせたら超便利

だったので紹介

percol とは

percol は入力の1行を1候補として,部分一致かつ AND 検索で絞り込みし,選択した候補を出力するコマンドです.端的に言えば Emacs の anything.el のコマンド版です.

An Elasticsearch in Crash Course!

By Andrew Cholakian

All examples use the Stretcher ruby gem

What is Elasticsearch?

  • An Information Retrieval (IR) System
  • A way to search your data in terms of natural language, and so much more
@faultier
faultier / data.csv
Last active December 29, 2015 02:29
阿賀野型ってあれでしょ?一番艦阿賀野、二番艦能代、三番艦阿賀野、四番艦阿賀野だよね…
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 6 columns, instead of 5. in line 7.
戦果,艦種,艦級,艦名,レア度,余談
S,軽空母,祥鳳型,祥鳳,3,半裸の人
A,正規空母,蒼龍型,蒼龍,4,
S,重巡洋艦,妙高型,妙高,3,
1,,,,,
C,,,,,
A,重巡洋艦,最上型,最上,3,
C,,,,
A,軽巡洋艦,長良型,鬼怒,3,マジパナイ鬼怒ちゃんマジパナイ
3,,,,,お仕置き部屋
@tcnksm
tcnksm / docker_cheat.md
Last active August 5, 2021 03:59 — forked from wsargent/docker_cheat.md
Docker 虎の巻

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."

@pcantalupo
pcantalupo / csfq2fq.pl
Created August 19, 2014 16:11
transform colorspace fastq to sanger fastq
#!/usr/bin/env perl
# Based on scripts and discussion found in http://seqanswers.com/forums/showthread.php?t=1425
# and https://www.biostars.org/p/43855/
# This script changes the color space sequence on the 2nd line of each fastq
# to base space. It does not convert the qual string since SOLID qual is
# already in Sanger format. The first base and quality value (primer) are
# discarded.
@tfuji
tfuji / biosample2ttl.rb
Created February 20, 2015 02:17
biosample2ttl.rb v0.2
#!/usr/bin/env ruby
require 'nokogiri'
require 'erb'
#require 'uri'
#require 'pp'
class BioSampleSet
include Enumerable
@tonets
tonets / kanazawa.md
Last active March 15, 2016 06:39
BH15.15向け金沢案内
@amatsus
amatsus / etc_profile.d_docker.sh
Last active March 13, 2018 07:20
This is a shell function to handling `docker run/stop/pause/unpause` in OGS/GE
#
# docker run wrapper for OGS/GE
#
# Copyright (c) 2016 Akihiro Matsushima
# Released under the MIT license
# http://opensource.org/licenses/mit-license.php
#
function sigconthandler() {
docker unpause $cid