Skip to content

Instantly share code, notes, and snippets.

@krishnau2
krishnau2 / draw_line.py
Created June 20, 2019 10:14
Sublime plugin for drawing line with 'll' command.
import sublime, sublime_plugin
class DrawLineCommand(sublime_plugin.EventListener):
def on_query_completions(self, view, prefix, locations):
if prefix in ('ll'):
val = '-'*50
else:
val = None
return [(prefix, prefix, val)] if val else []
@krishnau2
krishnau2 / billing_address.rb
Last active November 21, 2017 07:49
Refactoring OrdersController
class BillingAddress
def initialize(params)
@params = params
end
def generate
billing_address = { name: full_name,
address1: @params[:billing_address_line_1],
city: @params[:billing_city],