I hereby claim:
- I am abangratz on github.
- I am abangratz (https://keybase.io/abangratz) on keybase.
- I have a public key whose fingerprint is BE1C 9C97 BEFC 4246 CD54 E2A6 9D3D 90B7 7C90 FFFD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<div id="search_block"> | |
<%= form_tag(action: 'search', method: :put) do %> | |
<%= text_field_tag(:search, params[:search], placeholder: 'Search ...') %> | |
<%= submit_tag('Go') %> | |
<% end %> | |
</div> | |
<% if @rentals.blank? %> | |
<%# Notify user of missing parameter or empty result set %> | |
<h4>Please give a valid search term</h4> | |
<div class="help-block"> |
_usersnapconfig = | |
emailBox: true, | |
commentBox: true, | |
apiKey: "YOUR-API-KEY-HERE" | |
(-> | |
s = document.createElement("script") | |
s.type = "text/javascript" | |
s.async = true | |
s.src = '//api.usersnap.com/usersnap.js' |
:javascript | |
var _usersnapconfig = { | |
emailBox: true, | |
commentBox: true, | |
apiKey: "YOUR-API-KEY-HERE" | |
// for heroku: | |
// apiKey: "#{ENV['USERSNAP_APIKEY']}" | |
}; | |
(function() { | |
var s = document.createElement("script"); |
#!/usr/bin/env ruby | |
class String | |
def levenshtein(other) | |
range_self_end = self.size | |
range_other_end = other.size | |
data = | |
(0..range_self_end).map {|s| | |
(0..range_other_end).map {|t| | |
t + s unless t>0 && s>0 |