I hereby claim:
- I am shekibobo on github.
- I am kovachjc (https://keybase.io/kovachjc) on keybase.
- I have a public key whose fingerprint is 75C1 2506 FB58 4019 F849 4FA4 C82A 3DF4 1665 626E
To claim this, I am signing this object:
require 'capybara/poltergeist' | |
Capybara.asset_host = 'http://localhost:3000' | |
Capybara.javascript_driver = :poltergeist | |
RSpec.configure do |config| | |
config.before(:each, touchy_js: true) do | |
Capybara.current_driver = :selenium | |
end | |
config.after(:each, touchy_js: true) do |
I hereby claim:
To claim this, I am signing this object:
public List<String> getOptions() { | |
if (mOptions == null) { | |
FluentIterable<String> options = FluentIterable | |
.from(mAvailableThings) | |
.transform(Thing::getName); | |
mOptions = Lists.newArrayList(ImmutableSet.copyOf(options)); | |
} | |
return mOptions; | |
} |
# in config/initializers/devise/mailers/helpers.rb (I think) | |
module Devise | |
module Mailers | |
module Helpers | |
def headers_for(action, opts) | |
headers = { | |
subject: subject_for(action), | |
# overriding this one using the one from the form | |
to: resource.notification_email, | |
from: mailer_sender(devise_mapping), |
MyModel newModel = getNewModel(); | |
MyModel oldModel = getOldModel(); | |
String newValue = null; | |
newValue = newModel.getName(); | |
if (newValue != null) { | |
oldModel.setName(newValue); | |
} |
language: android | |
jdk: | |
- oraclejdk8 | |
android: | |
components: | |
- platform-tools | |
- tools | |
- build-tools-22.0.1 |
def buildConfigAndResStringField(variant, name, value) { | |
variant.resValue 'string', name.toLowerCase(), value | |
variant.buildConfigField 'String', name, "\"$value\"" | |
} | |
// Tried this, tests use the .debug suffix, not the .debug.test suffix | |
afterEvaluate { | |
android.applicationVariants.each { variant -> | |
buildConfigAndResStringField variant, "ACCOUNT_TYPE", variant.applicationId | |
buildConfigAndResStringField variant, "TOKEN_TYPE", variant.applicationId |
class LoginActivity extends Activity { | |
// Setup stuff | |
@Override | |
public void onResume() { | |
// Subscribe to the login view submit | |
AppObservable.bindActivity(this, loginView.getUserCredentialsObservable().subscribeOn(mainThread())) | |
.doOnNext(loginView.showProgress(true)) | |
.flatMap(creds -> getTokenObservable(creds)) | |
.subscribe(this::handleSuccess) |
#!/usr/bin/env ruby | |
class Palindrome | |
return string if string.length == 1 | |
l = "" | |
string.size.times do |i| | |
break if string.size - i <= l.size | |
c = -1 | |
while (a = string.rindex(string[i], c)) != i || a - i > l.size do | |
b = string[i..a] |
class User < ActiveRecord::Base | |
rolify :after_add => :event_added_mew_role #, :role_cname => 'Role' | |
accepts_nested_attributes_for :roles | |
attr_accessible :roles_attributes | |
# Include default devise modules. Others available are: | |
# :confirmable, | |
# :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, :token_authenticatable, | |
:recoverable, :rememberable, :trackable, :validatable |