Skip to content

Instantly share code, notes, and snippets.

@mikeebert
mikeebert / michelle_alexander_on_being.md
Last active February 9, 2018 13:08
Michelle Alexander Quote

Excerpt from an interview with Michelle Alexander during Krista Tippett's 'On Being' show

PROF. ALEXANDER: I’ve been thinking a lot lately about this notion of “revolutionary love” and what that means. And it’s something that I spoke with Vincent Harding quite a bit about. And I think for me what it means to be fully human is to open ourselves to fully loving one another in an unsentimental way. I’m not talking about the romantic love, or the idealized version of love, but that the simple act of caring for one another, and being aware of our connectedness as human beings, and also the reality of our suffering, and the reality that we make a lot of mistakes, and we struggle and we fail.

That’s all part of being human. We suffer, we love, we struggle, we fail, and then we love again. And I think trying not to imagine that we’re anything more or less than that, as human beings

@mikeebert
mikeebert / noam_install_windows.md
Last active January 3, 2016 05:39
Installation instructions for the noamserver on Windows

####Install Ruby and Ruby DevKit

  • download and install rubyinstaller (run exe file)
  • download development kit for 1.9.3 and extract to a permanent place
  • open the command line prompt with ruby. windows program 'start command prompt with ruby'
  • cd into wherever you extracted development kit
  • ruby dk.rb init
  • ruby dk.rb install (install of devkit should be successful)

####Install and Run NoamServer

@mikeebert
mikeebert / gist:6207653
Created August 12, 2013 01:17
Just messing around with the bowling kata
class BowlingScorer
def initialize
@score = 0
@rolls = []
@frame_index = 0
end
def roll(n)
@rolls << n
@mikeebert
mikeebert / production_environment.rb
Created January 30, 2013 04:39
Example of production environment Repository congif
configure :production do
Repository.register(:user, DatamapperRepository::UserRepository.new)
end
@mikeebert
mikeebert / datamapper_user_repository.rb
Created January 30, 2013 04:24
Example of a DataMapper Repository
module DataMapperRepository
class UserRepository
def model_class
DataMapperRepository::User
end
def new(attributes = {})
model_class.new(attributes)
end
configure :test, :development do
Repository.register(:user, MemoryRepository::UserRepository.new)
end
get "/user/:id" do
@user = Repository.for(:user).find_by_id(params[:id])
erb '/users/show'.to_sum
end
@mikeebert
mikeebert / repository.rb
Last active December 11, 2015 22:29
Repository Class
class Repository
def self.register(type, repo)
repositories[type] = repo
end
def self.repositories
@repositories ||= {}
end
def self.for(type)
@mikeebert
mikeebert / gist:4162410
Created November 28, 2012 16:37
Solr schema.xml differences between production and development
@@ -64,7 +64,6 @@
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.StandardFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
- <filter class="solr.PorterStemFilterFactory"/> ### Not in production schema.xml
</analyzer>
</fieldType>
<!-- *** This fieldType is used by Sunspot! *** -->
@mikeebert
mikeebert / gist:3924142
Created October 20, 2012 17:29
method examples
// changes value but doesn't return anything. takes in two integers as arguments.
public void changeArrayValue(int indexToChange, int newValue) {
numbers[indexToChange] = newValue;
}
//changes value and returns new array
public int[] changeAndReturnUpdatedArray(int indexToChange, int newValue) {
numbers[indexToChange] = newValue;
return numbers;
}