Skip to content

Instantly share code, notes, and snippets.

public class MyApp extends Application {
private static Context context;
private static ObjectGraph objectGraph;
@Override
public void onCreate() {
super.onCreate();
context = this;
@shekibobo
shekibobo / barcampgr-coc.md
Last active August 29, 2015 14:04
BarCamp Grand Rapids - Code of Conduct

BarCamp Grand Rapids Code of Conduct

‬Purpose

A‭ ‬primary‭ ‬goal‭ ‬of‭ BarCamp Grand Rapids‭ ‬is‭ ‬to‭ ‬be‭ ‬inclusive‭ ‬to‭ ‬the‭ ‬largest‭ ‬number‭ ‬of‭ ‬contributors,‭ ‬with‭ ‬the‭ ‬most‭ ‬varied‭ ‬and‭ ‬diverse‭ ‬backgrounds‭ ‬possible.‭ ‬As‭ ‬such,‭ ‬we‭ ‬are‭ ‬committed‭ ‬to‭ ‬providing‭ ‬a‭ ‬friendly,‭ ‬safe‭ ‬and‭ ‬welcoming‭ ‬environment‭ ‬for‭ ‬all,‭ ‬regardless‭ ‬of‭ ‬gender,‭ ‬sexual‭ ‬orientation,‭ ‬ability,‭ ‬ethnicity,‭ ‬socioeconomic‭ ‬status,‭ ‬and‭ ‬religion‭ (‬or‭ ‬lack‭ ‬thereof‭)‬.‭

This‭ ‬code‭ ‬of‭ ‬conduct‭ ‬outlines‭ ‬our‭ ‬expectations‭ ‬for‭ ‬all‭ ‬those‭ ‬who‭ ‬participate‭ ‬in‭ ‬our‭ ‬community,‭ ‬as‭ ‬well‭ ‬as‭ ‬the‭ ‬consequences‭ ‬for‭ ‬unacceptable‭ ‬behavior.

We‭ ‬invite‭ ‬all‭ ‬those‭ ‬who‭ ‬participate‭ ‬in‭ ‬BarCamp Grand Rapids ‬to‭ ‬help‭ ‬us‭ ‬create‭ ‬safe‭ ‬and‭ ‬positive‭ ‬experiences‭ ‬for‭ ‬everyone.

@shekibobo
shekibobo / capybara.rb
Created August 26, 2014 16:14
Conditionally swapping to Selenium for tests with touchy javascript issues.
# spec/support/capybara.rb
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
@shekibobo
shekibobo / .ackrc
Created August 28, 2014 16:14
dev configs
--type-set=xib=.xib
--type-set=mustache=.mustache
--type-set=rb=.rb
--type-set=erb=.erb
--type-set=haml=.haml
--type-set=sass=.scss,.sass
--type-set=coffee=.coffee
--ignore-dir=log
@shekibobo
shekibobo / capybara.rb
Created September 12, 2014 21:02
capybara.rb
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
@shekibobo
shekibobo / keybase.md
Created September 22, 2014 20:07
Keybase Identity

Keybase proof

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:

class Object
def tapp(msg = nil)
tap do |obj|
if msg.nil?
pp obj
elsif obj.respond_to?(msg)
pp obj.send(msg)
else
puts "#{obj} does not respond to #{msg}."
end
public List<String> getOptions() {
if (mOptions == null) {
FluentIterable<String> options = FluentIterable
.from(mAvailableThings)
.transform(Thing::getName);
mOptions = Lists.newArrayList(ImmutableSet.copyOf(options));
}
return mOptions;
}
@shekibobo
shekibobo / helpers.rb
Last active August 29, 2015 14:12
Attempt to send recovery email to alt_email
# 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);
}