初登場するコマンド: init, add, commit, log, config, status, diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('supertest'), | |
should = require('should'), | |
app = require('../server'); | |
var Cookies; | |
describe('Functional Test <Sessions>:', function () { | |
it('should create user session for valid user', function (done) { | |
request(app) | |
.post('/v1/sessions') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Learn Vimscript the Hard Way - Echoing Messages | |
# http://learnvimscriptthehardway.stevelosh.com/chapters/01.html | |
# | |
echomsg string(obj) | |
:message | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//oauth2 auth | |
chrome.identity.getAuthToken( | |
{'interactive': true}, | |
function(){ | |
//load Google's javascript client libraries | |
window.gapi_onload = authorize; | |
loadScript('https://apis.google.com/js/client.js'); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="demo"> | |
<h1>{{bob.fields.firstName}} {{bob.fields.lastName}}</h1> | |
</div> | |
<ul id="humans-list"> | |
<li v-repeat="humans"> | |
{{fields.firstName}} {{fields.lastName}} | |
</li> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# be sure to comment out the require 'capistrano/deploy' line in your Capfile! | |
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
set :application, 'my-cool-application' | |
# the base docker repo reference | |
set :name, "johns-stuff/#{fetch(:application)}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://codepen.io/hartzis/pen/VvNGZP | |
class ImageUpload extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
file: '', | |
imagePreviewUrl: '' | |
}; | |
this._handleImageChange = this._handleImageChange.bind(this); | |
this._handleSubmit = this._handleSubmit.bind(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace :admin do | |
resources :users | |
end | |
# rake routes | |
Prefix Verb URI Pattern Controller#Action | |
admin_users GET /admin/users(.:format) admin/users#index | |
POST /admin/users(.:format) admin/users#create | |
new_admin_user GET /admin/users/new(.:format) admin/users#new | |
dit_admin_user GET /admin/users/:id/edit(.:format) admin/users#edit |
OlderNewer