visit "/projects"
visit post_comments_path(post)
click_link "id-of-link"
click_link "Link Text"
# ... | |
def get_pages | |
# get an array of pages whose source filename contains .html | |
@pages = sitemap.resources.find_all { |page| page.source_file.match(/\.html/) } | |
# sort them by an arbitrary YAML frontmatter property called 'order' | |
@pages.sort! { |a,b| a.data['order'].to_i <=> b.data['order'].to_i } | |
end |
android { | |
signingConfigs { | |
release | |
} | |
buildTypes { | |
release { | |
signingConfig signingConfigs.release | |
} |
sudo a2enmod proxy_http | |
sudo service apache2 restart |
# DEPRECATED: use https://gist.github.com/cblunt/1042832 | |
# rails new my-app -m [raw url to this file] | |
gem 'json' | |
# Slim template | |
gem 'slim-rails' | |
gem 'simple_form' |
# encoding: utf-8 | |
class AvatarUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
# Choose what kind of storage to use for this uploader: | |
storage :file | |
# Override the directory where uploaded files will be stored. |
/* | |
* Copyright 2012 CodeSlap - Cristian Castiblanco | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
## mysql::master | |
ruby_block "store_mysql_master_status" do | |
block do | |
node.set[:mysql][:master] = true | |
m = Mysql.new("localhost", "root", node[:mysql][:server_root_password]) | |
m.query("show master status") do |row| | |
row.each_hash do |h| | |
node.set[:mysql][:master_file] = h['File'] | |
node.set[:mysql][:master_position] = h['Position'] | |
end |
@Override | |
protected void onHandleIntent(Intent intent) { | |
this.nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); | |
int jobId = intent.getIntExtra(JOB_ID_EXTRA, -1); | |
QypeModel model = intent.getParcelableExtra(MODEL_EXTRA); | |
if (model instanceof Place) { | |
this.uploadStrategy = new PlacePhotoUploadStrategy((Place) model); | |
} else if (model instanceof User) { | |
this.uploadStrategy = new UserPhotoUploadStrategy((User) model); | |
} else { |