Skip to content

Instantly share code, notes, and snippets.

@corroded
corroded / reddot_ruby_conf_day_two_notes.md
Created May 19, 2012 19:57
Day two notes from RedDot Ruby Conf

#Red Dot Ruby Conf 2012

##Day 2 Summary of Reddot Ruby Conf 2012

###Due Props: Obie Fernandez - Redis on Ruby

  • When to consider using Redis?
    • SQL is overkill
    • update-only data
  • non-transactional needs
@corroded
corroded / reddot_ruby_conf_day_one_notes.md
Created May 18, 2012 16:20
Day one notes from RedDot Ruby Conf. All the speakers were great(not to mention their slides), so just a disclaimer that the number of notes != how good the speaker is

#Red Dot Ruby Conf 2012

##Day 1 Summary of Reddot Ruby Conf 2012

###Google: Ilya Grigorik - Building a Faster Web

####Learned a lot of metrics from Google's Ilya Grigorik:

  • Average page size back in Nov 2010: 700KB
  • Average page size today: 1042KB (does that mean pretty much most of the web sites today are unusable for people with slow connections?)
@corroded
corroded / rake_results_for_t_gem
Created April 28, 2012 16:09
Rake spec results for t by sferik
```
Snowy: ~/src/t:master$ be rake spec
Could not find json-1.7.0 in any of the sources
Run `bundle install` to install missing gems.
Snowy: ~/src/t:master$ git status
# On branch master
nothing to commit (working directory clean)
Snowy: ~/src/t:master$ git pull origin master
remote: Counting objects: 43, done.
remote: Compressing objects: 100% (18/18), done.
@corroded
corroded / rvm_debug
Created March 1, 2012 00:43
RVM named ruby starting with sh bug trace log
Results for RVM debug:
system:
rvm 1.10.3 by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.beginrescueend.com/]
@corroded
corroded / feature-list2.html
Created December 22, 2011 18:10
cleaner example for ivolunteer
<ul id="opp-items">
<li class="opp-featured">
<img class="opp-feat-image" src="images/img-help-ondoy.jpg" />
<h2 class="opp-feat-title">Help Ondoy Victims Today!</h2>
<img src="images/feat-line.gif" />
<span class="opp-feat-type">Children &amp; Youth</span>
<p class="opp-feat-date">June 1, 2011 - July 31, 2011</p>
<p class="opp-feat-number">21 Volunteers needed</p>
<a href="event-1.html"><img src="images/btn-learnmore.gif" border="none" /></a>
</li>
@corroded
corroded / feature-list.html
Created December 22, 2011 18:06
example html for ivolunteer
<div id="opp-items">
<div class="opp-featured">
<div class="opp-feat-image"><img src="images/img-help-ondoy.jpg" /></div>
<div class="opp-feat-title"><h2>Help Ondoy Victims Today!</h2></div>
<img src="images/feat-line.gif" />
<div class="opp-feat-type">Children &amp; Youth</div>
<div class="opp-feat-date">June 1, 2011 - July 31, 2011</div>
<div class="opp-feat-number">21 Volunteers needed</div>
<a href="event-1.html"><img src="images/btn-learnmore.gif" border="none" /></a>
</div>
@corroded
corroded / w1andw0.rb
Created November 28, 2011 02:53
w1 and w0 solver for linear regression in ai class
M = 5
XS = [1,3,4,5,9]
YS = [2,5.2,6.8,8.4,14.8]
#XS = [0,1,2,3,4]
#YS = [3,6,7,8,11]
def calc_w1
((M * summation_of_x_and_y) - (summation_of_x * summation_of_y)) / ((M * summation_of_x_squared) - (summation_of_x * summation_of_x))
end
@corroded
corroded / _tour.sass
Created October 25, 2011 10:33
Jquery Tour css to sass for compass
.tooltip
position: absolute
width: 250px
left: 0
top: 0
background-color: black
color: white
z-index: 999
border: 2px solid #000
+border-radius(5px)
@corroded
corroded / link_to_with_current.rb
Created September 21, 2011 09:28
Adds current class to link if on the current page
@corroded
corroded / github_auto_messager.rb
Created May 20, 2011 07:02
This is a mechanize github message sender for the authors of all cucumber tmbundle forks
require 'rubygems'
require 'mechanize'
require 'net/http'
require 'json'
#get the tmbundle forkers
url = "http://github.com/api/v2/json/repos/show/cucumber/cucumber-tmbundle/network"
cuke_tmbundle_forkers = JSON.parse(Net::HTTP.get_response(URI.parse(url)).body).first[1].map{ |x| x["owner"] }
agent = Mechanize.new