Skip to content

Instantly share code, notes, and snippets.

View scottswezey's full-sized avatar
👋
Looking for work

Scott Swezey scottswezey

👋
Looking for work
View GitHub Profile
@scottswezey
scottswezey / keybase.md
Created April 11, 2015 03:07
keybase.md

Keybase proof

I hereby claim:

  • I am scottswezey on github.
  • I am scottswezey (https://keybase.io/scottswezey) on keybase.
  • I have a public key whose fingerprint is 5FB3 557B 064E EC1D 42CE 03A1 5852 80E6 05BA A81E

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<title>Starting StaticAssetTest App</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// Do ajax call to '/status' if we get 'Online' redirect
$.ajax({
url: '/status',
match 'status' => proc {|env| [200, {}, 'Online']}
match 'home' => proc {|env| [200, {}, 'It works!']}
<!DOCTYPE html>
<html>
<head>
<title>Starting StaticAssetTest App</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
url: '/status',
success: function(data) {
# **Updates**
%w{body_labor refinish_labor frame_labor}.each do |rate|
%w{mean mathematical_mode lowest highest}.each do |method|
@result.send(rate).send(method)
end
end
# **Original**
%table
module ResultsHelper
def make_table_row_for(result, rate)
ret << []
ret << content_tag(:tr) do
content_tag(:th, rate.to_s.humanize)
content_tag(:td) do
pretty_number_to_currency method(rate, [:mean, :mathematical_mode, :lowest, :highest])
end
end
return ret.join("\n")
[scott@server2 ~]$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 373 100 373 0 0 2442 0 --:--:-- --:--:-- --:--:-- 0
mkdir: cannot create directory `/usr/local/rvm': Permission denied
bash: line 10: cd: /usr/local/rvm/src: No such file or directory
Cloning into rvm...
remote: Counting objects: 2635, done.
remote: Compressing objects: 100% (1364/1364), done.
remote: Total 2635 (delta 1566), reused 1685 (delta 797)
class TodoItem
# provide reader and setter for name and state
attr_accessor :name, :state
def initialize(name)
# store name
self.name = name
# set state to undone
self.state = false
end
Name of some item to do
Another items to do
IMPORTANT item
etc
class TodoList
attr_accessor :file
def load(file = 'todo.txt')
@file = file
@list = []
# Check that file exists
if using_valid_file?
# read the file, create a list, create items, add them