Skip to content

Instantly share code, notes, and snippets.

View hatappo's full-sized avatar
🐢

fumihiko hata hatappo

🐢
  • Tokyo Japan
  • 08:30 (UTC +09:00)
View GitHub Profile
@eitoball
eitoball / README.ja.rdoc
Created March 12, 2010 13:14
この文書はrr バージョン0.10.10時点のREADME.rdocを日本語に訳した文書です。This is Japanese-translation of README.rdoc of rr as of version 0.10.10.

RR (Double Ruby、ダブルRuby)は、豊富なダブル化技術と簡潔な文法を備えたテストダブルフレームワークです。

詳細な情報

メーリングリスト

  • double-ruby-users@rubyforge.org

  • double-ruby-devel@rubyforge.org

ウェブサイト

@nikolaplejic
nikolaplejic / core.clj
Created September 2, 2010 17:54
File upload example in Compojure
(ns fileupload.core
(:use [net.cgrand.enlive-html
:only [deftemplate defsnippet content clone-for
nth-of-type first-child do-> set-attr sniptest at emit*]]
[compojure.core]
[ring.adapter.jetty])
(:require (compojure [route :as route])
(ring.util [response :as response])
(ring.middleware [multipart-params :as mp])
(clojure.contrib [duck-streams :as ds]))
@544
544 / ReNameOfindXargs.sh
Created April 15, 2011 08:08
findとxargsでファイル名変更
find ./ -type f -maxdepth 1 | xargs -i mv {} {}_YYYYMMDD
#1. findコマンドで現在のディレクトリ以下 ( ./ ) にあるファイル ( -type f ) の一覧を取得。(ただし、サブディレクトリは除く ( -maxdepth 1 )
#2. 上の結果をパイプでつないで、xargsコマンドで “mv {} {}_YYYYMMDD” に渡す。(xargs の-iオプションで{}の部分がファイル名に変換しつつ実行されます)
#上をちょっと応用するとこんなこともできます。
find ./ -type f -maxdepth 1 | grep _YYYYMMDD | sed 's/\.end//' | xargs -i mv {}.end {}
@kennethreitz
kennethreitz / 0_urllib2.py
Created May 16, 2011 00:17
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
@tomykaira
tomykaira / clockwork-init.sh
Created October 25, 2011 10:21
Create a new project with clockwork for heroku.
#!/bin/sh
# Licence: MIT
# Created by tomykaira, 2011-10-25
if [ $# -ne 1 ]; then
echo "Give me your new project name (only)"
exit 1
fi
@theconektd
theconektd / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@jboner
jboner / latency.txt
Last active July 24, 2024 19:52
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@japboy
japboy / jade-ftw.md
Last active October 23, 2023 11:18
Jade について。

Jade FTW

こんにちは。今回は現実逃避を兼ねて Jade の素晴らしさをお伝えしたいと思います。

Jade とは何か

[Jade][0] は JST (JavaScript Templates) の一つであり、HTML を書くための[軽量マークアップ言語][1] である [Haml][2] に影響を受けた JavaScript テンプレートエンジンでもあります。

@jerluc
jerluc / contents.markdown
Last active March 9, 2016 20:57
Open content linking proposal

On linking content across varying media

A brief history of hypertext documents

Many of the technologies being built today are based on the ideas initially conceived by post-World War II scientists. In fact, it was in July of 1945, when Dr. Vannevar Bush described the ["memex" device][2], a device with an uncanny resemblance to the Internet:

A memex is a device in which an individual stores all his books, records, and communications, and which is mechanized so that it may be consulted with exceeding speed and flexibility.

Only twenty years later in 1965, Ted Nelson, inspired by the same Dr. Bush, would conceive of the idea that content and documents should be ["hyperlinked"][3]. And finally in 1990, [Tim Berners-Lee along with some of his colleagues][4], would tie the concept of the hyperlink together with the idea of an inter-connected world to develop what we know now today as the Internet, allowing humankind to access and link information across vast distances almost instantly.

The disconnec

@tokiwoousaka
tokiwoousaka / Main.hs
Last active May 16, 2023 15:26
関数型LT大会発表資料
module Main where
import Game.NovelMonad
import Game.NovelMonad.SimpleInterpreter
import Story
main :: IO ()
main = simpleInterpret defaultConfig novelMain
novelMain :: Novel ()
novelMain = do