Skip to content

Instantly share code, notes, and snippets.

View kaorukobo's full-sized avatar

Kaoru Shirai kaorukobo

  • Hiroshima, Japan
View GitHub Profile
@ygit
ygit / SkipVerification.txt
Last active March 29, 2024 08:27
Skip Verification of Mac Apps
xattr -d com.apple.quarantine /path/to/app/myMacApp.app
@udzura
udzura / td-agent.service
Created December 3, 2015 06:49
systemd環境でのtd-agentのUnitファイル
[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
@hiasinho
hiasinho / factory_girl_strategy_find_or_create.rb
Last active May 27, 2020 18:31
FactoryGirl strategy for adding find & find_or_create
## 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
@t-nissie
t-nissie / HowToGist.md
Last active December 9, 2023 09:44
Gistの使い方のメモ

Gistの使い方のメモ

Gistを使い始めて気がついた点をメモした。 Gistはこのようなメモや短いコードをバージョン管理しながら公開するのに便利。

特にこのメモでは、画像を同一ディレクトリに置いて、 それGFMファイル内に挿入する方法を解説。

このメモにはgitコマンドの使い方の解説はない。 このメモは随時更新される予定。

# 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`.
@Rarst
Rarst / r-debug.php
Last active February 3, 2024 17:30
R Debug (set of dump helpers for debug)
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/
@sandro
sandro / gist:204016
Created October 7, 2009 13:12
Compile Ruby Cocoa on Snow Leopard
# 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