Skip to content

Instantly share code, notes, and snippets.

View tjchambers's full-sized avatar

Tim Chambers tjchambers

View GitHub Profile
@tjchambers
tjchambers / searcher.haml
Created July 17, 2017 18:38
haml for search
= javascript_include_tag 'searcher'
.text-right{ style: 'padding-bottom:14px;font-size:1.2em' }
.fa.fa-search.ico-place
%input{ style: '-webkit-appearance:searchfield;font-family: FontAwesome;',
type: 'search',
placeholder: 'Search ...',
onKeyUp: 'ds(this.value)',
onClick: 'ds(this.value)',
size: 27,
id: 'search_box' }
@tjchambers
tjchambers / searcher.haml
Created July 17, 2017 18:38
haml for search
= javascript_include_tag 'searcher'
.text-right{ style: 'padding-bottom:14px;font-size:1.2em' }
.fa.fa-search.ico-place
%input{ style: '-webkit-appearance:searchfield;font-family: FontAwesome;',
type: 'search',
placeholder: 'Search ...',
onKeyUp: 'ds(this.value)',
onClick: 'ds(this.value)',
size: 27,
id: 'search_box' }
@tjchambers
tjchambers / csv_with_bom.rb
Created November 14, 2021 00:30 — forked from romeuhcf/csv_with_bom.rb
Ruby 2.5 support for opening csv with bom|utf-8
class CSV
def self.open(file, options={}, &block)
encoding = options.delete(:encoding)
File.open(file, "r:#{encoding}") do |fd|
yield CSV.new(fd, options)
end
end
end
Application.put_env(:sample, Example.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 5001],
server: true,
live_view: [signing_salt: "aaaaaaaa"],
secret_key_base: String.duplicate("a", 64)
)
Mix.install([
{:plug_cowboy, "~> 2.5"},
{:jason, "~> 1.0"},