Gistを使い始めて気がついた点をメモした。 Gistはこのようなメモや短いコードをバージョン管理しながら公開するのに便利。
特にこのメモでは、画像を同一ディレクトリに置いて、 それGFMファイル内に挿入する方法を解説。
このメモにはgitコマンドの使い方の解説はない。 このメモは随時更新される予定。
xattr -d com.apple.quarantine /path/to/app/myMacApp.app |
[Unit] | |
Description=Fluentd: data collector for Treasure Data | |
Documentation=http://docs.fluentd.org/ | |
After=network-online.target consul_agent.service | |
Wants=network-online.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/td-agent/td-agent.pid | |
ExecStart=/etc/rc.d/init.d/td-agent start |
## http://stackoverflow.com/questions/7145256 | |
module FactoryGirl | |
module Strategy | |
class Find | |
def association(runner) | |
runner.run | |
end | |
def result(evaluation) | |
build_class(evaluation).where(get_overrides(evaluation)).first |
# A formtastic input which incorporates carrierwave uploader functionality. | |
# | |
# Intelligently adds the cache field, displays and links to the current | |
# value if there is one, adds a class to the wrapper when replacing an | |
# existing value, allows removing an existing value with the checkbox | |
# taking into account validation requirements. | |
# | |
# There are several options: | |
# | |
# * Toggle the replacement field with `replaceable: true/false`. |
<?php | |
/* | |
Plugin Name: R Debug | |
Description: Set of dump helpers for debug. | |
Author: Andrey "Rarst" Savchenko | |
Author URI: https://www.rarst.net/ | |
License: MIT | |
*/ |
# ARCHFLAGS may or may not matter - I set mine up this way just in case. | |
~$ echo $ARCHFLAGS | |
-arch i386 -arch x86_64 | |
# Be sure to compile ruby with --enable-shared | |
~$ rvm install 1.9.1 --debug --reconfigure -C --enable-shared=yes | |
# Test to ensure that --enable-shared worked | |
~$ ruby -e "require 'rbconfig'; puts Config::CONFIG['ENABLE_SHARED']" | |
yes |