Skip to content

Instantly share code, notes, and snippets.

View superscott's full-sized avatar
👺
щ(ಠ益ಠщ) (✖╭╮✖) ᕦ(ò_óˇ)ᕤ

superscott superscott

👺
щ(ಠ益ಠщ) (✖╭╮✖) ᕦ(ò_óˇ)ᕤ
View GitHub Profile
@superscott
superscott / text
Created November 28, 2013 17:07
Serious! Pony! Mics!
Blue Baby Bottle: Dont let the size fool you.
http://www.guitarcenter.com/Blue-Baby-Bottle-Microphone-101491603-i1127334.gc
Shure Beta 87A: This is used on stage for peeps a lot, like Kelly Clarkson types.
http://www.guitarcenter.com/Shure-Beta-87A-Supercardioid-Condenser-Mic-100091052-i1126526.gc
Audio-Technica AT4040: Solid.
http://www.guitarcenter.com/Audio-Technica-AT4040-Large-Diaphragm-Studio-Condenser-Mic-101875912-i1126600.gc
@superscott
superscott / tags.rb
Created November 18, 2013 22:41
content_tags!!
<div class="form-group">
<label class="col-lg-3 control-label">Business Information</label>
<div class="col-lg-9">
<p class="form-control-static">
<%= finalize_signup_display_complete(false) %>
</p>
</div>
</div>
@superscott
superscott / gist:7442122
Created November 13, 2013 01:39
OpenSSL.
~/Documents/workspace/contracts [17:21:37] [ruby-2.0.0-p247@rails3] $ rails c
Loading development environment (Rails 3.2.15)
[17] main » digest = OpenSSL::Digest::MD5.new
(pry) output error: #<TypeError: no implicit conversion of Object into String>
@superscott
superscott / search.js
Last active December 19, 2015 10:09
jQuery Search.
<div id='search_div'>
<input type="text" class="search-query" id="search_text">
<button class="btn" id='search_button'><i class='icon-search'></i></button>
</div>
<address id="2106">
<strong>RandoZZ ZZMcCracken</strong><br>
<small>home:</small> <a href="mailto:home@email.com">home@email.com</a><br><small>work:</small> <a href="mailto:work@email.com">work@email.com</a><br><small>primary:</small> <a href="mailto:primary@email.com">primary@email.com</a><br><small>other:</small> <a href="mailto:other@email.com">other@email.com</a><br>
<small>home phone:</small> 1-310-555-5555 <br><small>work phone:</small> 1-310-555-3333 <br><small>cell phone:</small> 1.310.555.1212
</address>
[4] pry(main)> asd = ('A'..'Z')
=> "A".."Z"
[5] pry(main)> asd.each do |p|
[5] pry(main)* puts p
[5] pry(main)* end
A
B
C
D
E
@superscott
superscott / gist:5085435
Created March 4, 2013 20:39
remove formatting on numbers.
Example:: v.first == "1,000" or v.first == "$15,000.00"
<td>
<div>
<span title=<%= !v.first.nil? ? v.first.gsub(',', '') : nil %>></span>
<% v.each do |col_value| %>
<%= col_value %>
<% end %>
</div>
</td>
@superscott
superscott / gem_make.out
Last active December 14, 2015 08:49
gem install error?
cat /Users/.rvm/gems/ruby-2.0.0-p0@gems/gems/therubyracer-0.11.4/ext/v8/gem_make.out
/Users/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
creating Makefile
make
compiling accessor.cc
accessor.cc:1: error: bad value (corei7) for -march= switch
accessor.cc:1: error: bad value (corei7) for -mtune= switch
def self.clean(value, level)
case level
when 1 #strip html and tags
results = Sanitize.clean(value)
when 2 #includes level 1, regex to allow symbols
leveltwo = Sanitize.clean(value)
leveltwo.strip!
results = leveltwo.gsub(/[^0-9a-zA-Z\(\)\|\:\/\,\'\.\-\@\_\[\]\&\?\=\s]/, "")
asd = Price.where("min_color <= ? AND min_qty <= ? ", 1, 34)
@select_options = { "value" => "value", "name" => "name" }
<%= select_tag 'group_by', options_from_collection_for_select(@select_options, "value", "name") %>