- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
# Originally written by Justin French (2008): | |
# http://justinfrench.com/notebook/a-custom-rake-task-to-reset-and-seed-your-database | |
# | |
# Modified to work with Rails 4. | |
desc 'Raise an error unless development environment' | |
task :safety_check do | |
raise "You can only use this in dev!" unless Rails.env.development? | |
end |
by https://github.com/erlang/otp/wiki/Writing-good-commit-messages
良いコミットメッセージは、重要な役割が、少なくとも三つあります。
#!/usr/bin/env perl | |
use strict; | |
use utf8; | |
use warnings; | |
use Encode; | |
use MIME::Base64; | |
use Net::SMTP; | |
use Authen::SASL; |
基礎知識
読み物系
#!/bin/bash | |
# | |
# inotify-git | |
# | |
# 対象ディレクトリを再帰的に監視し、 | |
# 変更をすべて git で自動コミットする | |
# | |
# 再起動しても勝手に監視させるには | |
# /etc/rc.local に | |
# /path/to/inotify-git directory & |
#!/bin/bash | |
usage() | |
{ | |
cat << EOF | |
usage: $0 options | |
This script set ownership for all table, sequence and views for a given database | |
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |
Please check here for an up-to-date config for a WISP (wireless ISP) setup on OpenWrt 14.07.
full_data = { | |
response: {body: StyledYAML.literal(DATA.read), status: 200}, | |
person: StyledYAML.inline('name' => 'Steve', 'age' => 24), | |
array: StyledYAML.inline(%w[ apples bananas oranges ]) | |
} | |
StyledYAML.dump full_data, $stdout | |
__END__ | |
{ |
require 'httparty' | |
response = HTTParty.get('http://www.google.com/ig/api?weather=Chicago') | |
data = response.parsed_response | |
puts data['xml_api_reply']['weather']['current_conditions']['condition']['data'] |