未開封のWindows PCと一緒に手渡された環境構築マニュアル、1つ1つ手作業で進めるだけで初日が終わってしまった、そんな時間の無駄を省く為のドキュメント。
Windows
とR
を同時に押して、cmd
と入力、Enter
を押下
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
{% if include.content %} | |
<meta property="{{ include.property }}" content="{{ include.content }}" /> | |
{% endif %} |
HTML | |
===== | |
<script type='text/javascript'> | |
window.jQuery || document.write('<script src="js/jquery-1.7.1.js">\x3C/script>') | |
</script> | |
<script src='http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js' type='text/javascript'></script> | |
<script type='text/javascript'> | |
window.Modernizr || document.write('<script src="js/modernizr-2.0.6.js">\x3C/script>') | |
</script> |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
#!/usr/bin/env ruby | |
# Simple 404 finder | |
require 'rubygems' | |
require 'anemone' | |
url = ARGV[0] | |
if url.nil? |
function! s:separate_defenition_to_each_filetypes(ft_dictionary) "{{{ | |
let result = {} | |
for [filetypes, value] in items(a:ft_dictionary) | |
for ft in split(filetypes, ",") | |
if !has_key(result, ft) | |
let result[ft] = [] | |
endif | |
call extend(result[ft], copy(value)) |
## | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Ryan Morrissey | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
public static class UnixTime | |
{ | |
private static readonly DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
/*===========================================================================*/ | |
/** | |
* 現在時刻からUnixTimeを計算する. | |
* | |
* @return UnixTime. | |
*/ |