Skip to content

Instantly share code, notes, and snippets.

View nobuoka's full-sized avatar

Nobuoka Yu nobuoka

View GitHub Profile
@omasanori
omasanori / gist:7858569
Last active April 30, 2024 12:43
Rustのパターンマッチの話

Rustのパターンマッチの話

既に穴だらけですが、やれるだけやっていきます。今回はパターンマッチの話です。

TL;DR(経験者向け)

はい、あなたのよく知るパターンマッチです。ガードも使えますが、他の言語でガードを使うパターンの一部はOCamlのorパターンと同等の機能や範囲を表す機能によって置き換えることができます。

@Songmu
Songmu / MyApp::DB.pm
Last active December 14, 2015 12:29
Tengの最近の雛形
package MyApp::DB;
use 5.016;
use warnings;
use utf8;
use Time::Piece::Plus;
use Class::Method::Modifiers;
use Teng::Schema::Loader;
use MyApp::DB::ResultSet;
use MyApp::Exception;
@teramako
teramako / README.md
Created June 20, 2012 14:36
add Listeners Panel to DOM Inspector

DOM Inspector にイベントリスナのパネルを追加

cap

  • プロファイルディレクトリ/extensions/inspector@mozilla.org/chrome/inspector.jar を unzip
  • mkdir content/inspector/viewers/eventListeners/
  • eventListeners.xuleventListeners.jscontent/inspector/viewers/eventListeners/ に配置
  • content/inspector/res/viewer-registry.rdf にパッチを当てる
  • zip inspector.jar -r ... でアーカイブ作成
<!DOCTYPE html>
<!-- File > New Project > Templates > JavaScript > Blank App; replace default.html with this -->
<html>
<head>
<meta charset="utf-8" />
<title>App2</title>
<!-- WinJS references -->
<link href="//Microsoft.WinJS.1.0.RC/css/ui-dark.css" rel="stylesheet" />
<script src="//Microsoft.WinJS.1.0.RC/js/base.js"></script>