Skip to content

Instantly share code, notes, and snippets.

2015-04-27 21:35:19 -0700
./configure
--disable-debug
--disable-dependency-tracking
--prefix=/usr/local/Cellar/kbtin/1.0.14_1
configure: WARNING: unrecognized options: --disable-debug
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
@svesely
svesely / gist:5736117
Last active December 18, 2015 05:58
Grocery scratch
select prod_barcode, prod_brand, prod_name, prod_size, quantity, lloc_name, items_date_added
from products
inner join items on products._id = items.io_id
left outer join lloc on lloc._id = items.location
order by prod_name
810979005254 True Citrus - True Orange Crystallized Orange 32 x .8g Packets - 0.91 oz. 1.0 Sunroom Cabinet 2013-06-06
037000847366 Puffs 180 Count Assorted Boxes Basic Facial Tissue 84736 - 24 Pack 9.0 Sunroom Cabinet 2013-06-06
048121277079 Thomas' Bagels Plain Pre-Sliced 6 Ct 22 oz 3.0 Sunroom Freezer
013409351505 Sweet Baby Ray's Barbecue Sauce Hickory & Brown Sugar 18 oz 1.0 Sunroom Cabinet 2013-06-06
@svesely
svesely / gist:1211602
Created September 12, 2011 15:49
Collection operations?
# My understanding of classical OOP would suggest that this model is a better model of the business practice:
class Payment
def process
###
end
end
Class PaymentCollection
has_many :payments
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index efdfc85..7d7c904 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -7,7 +7,7 @@
%meta{ :content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible" }/
%title
- == #{ controller.controller_name.titleize } - #{ controller.action_name.titleize }
+ TuNG
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for i in $(ls -1 | grep '.*m4a'); do
ffmpeg -ab 256k -i ${i} ${i%m4a}mp3 -map_meta_data ${i%m4a}mp3:${i}
done
IFS=$SAVEIFS
Factory.factories.each do |name, factory|
Given /^an? #{name} exists with an? (.*)$/ do |attr|
attributes = attr.split(" and ").inject({}) do |attributes, pair_string|
pair = pair_string.gsub(/^an? /, '').split(" of ")
attributes[pair.shift.downcase.strip.to_sym] = pair.pop.to_s.scan(/".*"/).first.gsub('"','')
attributes
end
Factory(name, attributes)
end
end
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell))
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
# Use the ruby + gem set
∴ rvm 1.9.1%rails3