This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recipe: users::default | |
* users_manage[deploy] action create | |
================================================================================ | |
Error executing action `create` on resource 'users_manage[deploy]' | |
================================================================================ | |
Net::HTTPServerException | |
------------------------ | |
404 "Object Not Found" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Next time you feel like mocking another developer for his or her lack of | |
skills in a certain area, stop yourself. Talk to the person and explain | |
to them why you think something they are doing is incorrect or how it | |
could be done better. This way, you don’t come off as a jerk, and the | |
other developer learns something new and improves. And I’d be surprised | |
if you didn’t learn something from the experience, too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'csv' | |
require 'json' | |
file = CSV.new(File.new('stuff_i_need_to_extract.csv', 'rb'), :headers => true).read | |
result = [] | |
result = file.map do |row| | |
extract_data_from_row(row) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color] | |
ui = auto | |
ui = true | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- kick them to the curb unless they look like mick jagger | |
delete from measurements as m where m.id | |
in | |
( | |
-- This finds all of our duplicate measurements | |
select id from measurements | |
inner join ( | |
select min(id) minid, keg_id, volume from measurements | |
group by keg_id, volume | |
having count(1) > 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apply to Shopify API # | |
Interested in working at Shopify? Don't use that form, you're a | |
developer and can clearly do better than that! | |
Instead you can apply to Shopify via our application API. Of course, | |
for the extra effort you will be given a higher priority than those | |
who simply apply via the webform. | |
# How? # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prod = ShopifyAPI::Product.find(6) | |
before = prod.variants.collect{|v| "#{v.position} - #{v.option1}"} | |
prod.variants[0].position = 3 | |
prod.variants[2].position = 1 | |
prod.variants.collect(&:save) | |
prod = ShopifyAPI::Product.find(6) | |
after = prod.variants.collect{|v| "#{v.position} - #{v.option1}"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LinearLayout roundedCell = new LinearLayout(this); | |
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); | |
int drawableId = -1; | |
if(rounded.equals("top")) { | |
drawableId = R.drawable.list_view_heading_list; | |
layoutParams.setMargins(0, 0, 0, 1); | |
} else if(rounded.equals("bot")) { | |
drawableId = R.drawable.list_view_footer_list; | |
layoutParams.setMargins(1, 0, 0, 0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn get-lists | |
"Calls the rtm api to retrieve lists, returning the attributes from the xml" | |
[state] | |
(if-let [list-xml (xml/to-xml (api/rtm-lists-getList state))] | |
(for [x (xml-seq list-xml) :when (= :list (:tag x))] | |
(:attrs x)))) |