これはフィードフォースエンジニア Advent Calendar 2015の22日目の記事です。
21日目は "ウォシュレットではなく、トイレットペーパー派" 茂木くんのruby の構文解析器 astrolabe を使ってみたでした。
そういえば、昔文章を書く勉強をしてたんでした。
# ==== Emojis ==== | |
# 🐛 :bug: バグ修正 | |
# 👍 :+1: 機能改善 | |
# ✨ :sparkles: 部分的な機能追加 | |
# 🎉 :tada: 盛大に祝うべき大きな機能追加 | |
# ♻️ :recycle: リファクタリング | |
# 🚿 :shower: 不要な機能・使われなくなった機能の削除 | |
# 💚 :green_heart: テストやCIの修正・改善 |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Mackerel Graph Builder</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
function update() { | |
var d = $("#def")[0].value; | |
var o = $("#org")[0].value; |
これはフィードフォースエンジニア Advent Calendar 2015の22日目の記事です。
21日目は "ウォシュレットではなく、トイレットペーパー派" 茂木くんのruby の構文解析器 astrolabe を使ってみたでした。
そういえば、昔文章を書く勉強をしてたんでした。
source 'https://rubygems.org' | |
ruby '2.1.5' | |
gem 'i18n' | |
gem 'activesupport' | |
gem 'octokit' |
# match hashes with indifferent access | |
# | |
# example) | |
# expect({"key1" => 1, :key2 => 2}).to equal_with_indifferent_access(key1: 1, key2: 2) | |
RSpec::Matchers.define :equal_with_indifferent_access do |expected| | |
match do |actual| | |
actual.with_indifferent_access == expected.with_indifferent_access | |
end |
EMACS_VER=24.3 | |
curl -O http://ftp.gnu.org/pub/gnu/emacs/emacs-${EMACS_VER}.tar.gz | |
curl -O https://gist.github.com/anonymous/8553178/raw/c0ddb67b6e92da35a815d3465c633e036df1a105/emacs.memory.leak.aka.distnoted.patch.diff | |
svn co http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk inline_patch | |
tar xvfz emacs-${EMACS_VER}.tar.gz | |
cd emacs-${EMACS_VER} |
#!/usr/bin/env bash | |
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz | |
mkdir vim && tar xzvf vim.tar.gz -C vim | |
export PATH=$PATH:/app/vim/bin |
<?php | |
$pagination = new Pinoco_Pagination( | |
// How many elements? | |
function($pagination) { | |
return $pagination->db->prepare( | |
"SELECT count(id) as c FROM ..." | |
)->query()->fetchOne()->c; | |
}, | |
// What to be shown? | |
function($pagination, $offset, $limit) { |
<?php | |
class Singleton { | |
private static $_self = null; | |
public $count = 0; | |
private function __construct() { | |
} | |
public static function getInstance() { | |
if (is_null(self::$_self)) { |