Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am nikolai-b on github.
  • I am nikolaib (https://keybase.io/nikolaib) on keybase.
  • I have a public key ASBm-GdVTBjuX1LVR0yd_Ezyi6M6U672iC5Q4hSM2G_3two

To claim this, I am signing this object:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width"/>
<link rel="stylesheet" href="../../ink.css"/>
<style>
/**********************************************
* Ink v1.0.5 - Copyright 2013 ZURB Inc *
**********************************************/
class AddressService
def self.from_params(address_params)
attrs = %i(firstname lastname address1 address2 city zipcode country phone special_instructions work_address)
address = Spree::Address.new(address_params.permit(*attrs))
new(address)
end
def self.search(postcode)
response = HTTParty.get(URI.encode("https://api.getAddress.io/v2/uk/#{format_postcode(postcode)}?api-key=IwY6WOWKbk22eiXSQN_07g1570&format=true"))
response.deep_symbolize_keys!
"
":au FocusLost * silent! wa
" Clipboard stuff
"
inoremap <Tab> <C-n>
"set clipboard=unnamedplus " this copies to debian's clipboard