Skip to content

Instantly share code, notes, and snippets.

@susatadahiro
susatadahiro / wizard.css
Last active January 4, 2016 08:09
wizard using fuelux
.fuelux .wizard {
position: relative;
overflow: hidden;
background-color: #f9f9f9;
border: 1px solid #d4d4d4;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
*zoom: 1;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
{% for item in tables["ニュース"].rows %}
<article class="post">
<div class="post_header">
<h3 class="post_title"><a href="/news/-/detail/=/news_id={{ item["id"] }}/">{{ item["タイトル"] }}</a></h3>
<div class="post_sub"><i class="icon-time"></i> {{ item["published_at"] | date: "%Y/%m/%d" }} ({{ item["published_at"] | date: "%Y/%m/%d" | youbi }})</div>
</div>
<div class="post_content">
{{ item["本文"] | strip_html | truncate: 100 }}
<a href="/news/-/detail/=/news_id={{ item["id"] }}/" class="btn btn-primary">続きを読む</a> </div>
</article>
@susatadahiro
susatadahiro / liquid-tables
Last active December 18, 2015 21:38
Liquidマークアップを使って、Webデータベースの情報を取り出す。
<table>
<tr>
<th>タイトル</th><th>本文</th>
</tr>
{% for item in tables["ニュース"].rows %}
<tr>
<td>{{ item["タイトル"] }}</td><td>{{ item["本文"] }}</td>
</tr>
{% endfor %}
</table>
@susatadahiro
susatadahiro / gist:5667447
Created May 29, 2013 01:51
munin plugins apt_ubuntu + reboot-required-packages
#!/usr/bin/env python
# -*- encoding: iso-8859-1 -*-
#
# apt_ubuntu
#
# Plugin to monitor packages that should be installed on Ubuntu systems.
#
# Author: Stefan Daniel Schwarz <munin@wolfram.ravenwolf.de>
#
# v1.0 2008-11-07 - First draft
@susatadahiro
susatadahiro / check_domain
Created September 13, 2012 09:56
check domain expired. nagios plugins.
#/usr/lib/nagios/plugins/check_domain
#nagios plugins
#original:
#http://exchange.nagios.org/directory/Plugins/Internet-Domains-and-WHOIS/check_domain/details
#
#this plugins can check
# example.co.jp (level 3 domain)
# example.jp (level 2 domain)
#
#usage:
@susatadahiro
susatadahiro / intra_mysql_metrics
Created March 5, 2012 02:17
Munin Plugin to monitor the number of records on a mysql-server
#!/bin/sh
# -*- sh -*-
: << =cut
=head1 NAME
intra_mysql_metrics - Munin Plugin to monitor the number of records on a
mysql-server
@susatadahiro
susatadahiro / aws.cfg
Created January 16, 2012 04:19
check_ec2
#/etc/nagios-plugins/config/check_aws
#
#
# 'check_aws' command definition
define command{
command_name check_ec2
command_line /usr/lib/nagios/plugins/check_aws
}
@susatadahiro
susatadahiro / how to use
Last active September 25, 2015 01:48
munin plugins: rails log time(total, view, db) at rails3.0
munin-plugin: rails_response_time
# original source: http://blog.tkmr.org/tatsuya/show/420-munin-rails
# rails_log_chopper
$ ruby ./script/rails_log_monitor.rb -l log/rails_log_monitor.log
# munin_plugin