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
lock '3.4.0' | |
set :application, 'smart2channel' | |
set :deploy_to, "/opt/#{fetch(:application)}" | |
set :repo_url, '[email protected]:unosk/smart2channel.git' | |
set :branch, 'master' | |
set :scm, :git | |
set :linked_dirs, %w(log tmp/pids tmp/cache tmp/sockets vendor/bundle public/uploads) |
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 :itamae do | |
desc 'Itamae plan(dry-run)' | |
task :plan do | |
run_itamae(dry_run: true) | |
end | |
desc 'Itamae apply' | |
task :apply do | |
run_itamae(dry_run: true) | |
end |
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
require 'json' | |
set :itamae_rsync_src, './ops/itamae' | |
set :itamae_rsync_dst, '/tmp/itamae' | |
set :itamae_rsync_options, %w(-avzr --delete --exclude='.vagrant') | |
namespace :itamae do | |
task :install do | |
on roles(:all) do | |
execute <<-SCRIPT |
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
{ | |
"builders": [{ | |
"type": "amazon-ebs", | |
"region": "ap-northeast-1", | |
"source_ami": "ami-936d9d93", | |
"instance_type": "m3.medium", | |
"ssh_username": "ubuntu", | |
"ami_name": "smart2channel-base {{timestamp}}" | |
}], | |
"provisioners": [ |
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
.terraform/ |
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
import android.view.View; | |
public class UiVisibilityHelper { | |
private View[] mViews; | |
public UiVisibilityHelper(View... views) { | |
mViews = views; | |
} |
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
public abstract class BaseActivity extends ActionBarActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(getClass().getAnnotation(InjectLayout.class).value()); | |
ButterKnife.inject(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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** | |
* TODO: Add a class header comment! | |
*/ | |
public class AspectRatioImageView extends ImageView { |
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
import android.content.Context; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkError; | |
import com.android.volley.NoConnectionError; | |
import com.android.volley.ServerError; | |
import com.android.volley.TimeoutError; | |
public class VolleyErrorHelper { |
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
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
public abstract class ArrayAdapter<T, VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> { |
NewerOlder