http://tech.pristine.io/android-unit-test-idioms/ http://touk.pl/blog/pl/2014/02/26/mock-retrofit-using-dagger-and-mockito/ https://software.intel.com/en-us/videos/test-driven-development-and-android-testing-by-christopher-perry-and-marcelo-bay-area-android (http://uds.ak.o.brightcove.com/740838651001/740838651001_3482875046001_Android-Fest-Chris-and-Marcello-4-12-14.mp4) https://www.reddit.com/r/androiddev/comments/2mebor/testing_retrofit_observable_with_robolectric/ http://www.slideshare.net/godfreynolan/android-tdd-41783654 http://code.tutsplus.com/tutorials/dependency-injection-with-dagger-2-on-android-- cms-23345 http://code.tutsplus.com/tutorials/quick-tip-using-butter-knife-to-inject-views-on-android--cms-23542 http://square.github.io/ (author of retrofit, dagger)
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) | |
(add-to-list 'auto-mode-alist '("\\.Rmd\\'" . markdown-mode)) | |
(add-to-list 'auto-mode-alist '("\\.rmd\\'" . markdown-mode)) | |
(add-hook 'markdown-mode-hook 'turn-on-outline-minor-mode) | |
(defun rmarkdown-new-chunk (name) | |
"Insert a new R chunk." | |
(interactive "sChunk name: ") | |
(insert "\n```{r " name "}\n") | |
(save-excursion |
This file contains 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
RSpec::Matchers.define(:be_same_file_as) do |exected_file_path| | |
match do |actual_file_path| | |
md5_hash(actual_file_path).should == md5_hash(exected_file_path) | |
end | |
def md5_hash(file_path) | |
Digest::MD5.hexdigest(File.read(file_path)) | |
end | |
end |
This file contains 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
DatabaseCleaner.strategy = :truncation, { :except => %w[ translations ] } |
This file contains 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
# WARNING: Unrefactored Proof of Concept | |
# | |
# Allows: | |
# [1,1,1].should all_be eq(1) | |
# [2,4,6].should all_be_even | |
# [2,3,5].should all_be { |n| prime?(n) } # for appropriate definition of prime?# | |
# | |
# Not Yet Implemented: | |
# [1,1,1].should all_be == 1 | |
# [3,6,9].should all_be_divisible_by(3) |
This file contains 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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css" /> | |
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg'></script> | |
<script src="http://openlayers.org/api/OpenLayers.js"></script> | |
<script src="http://www.google.com/jsapi?key=ABQIAAAAUXDSXET8IRGdgHP9FpGw5BT-fVzUWGS_eJ2ZLPBO_6yPqTi0vhQKAzahOrduDq0xQk09GR-UP3Jgcg"></script> | |
<script type="text/javascript"> | |
google.load("jquery", '1.4'); | |
google.load("maps", "2.x"); | |
</script> |
This file contains 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
#!/usr/bin/env zsh | |
if [[ -s "${TM_PROJECT_DIRECTORY}/.rvmrc" ]] | |
then | |
source "${TM_PROJECT_DIRECTORY}/.rvmrc" | |
fi | |
`which ruby` $* |
This file contains 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
(defun haml-mumamo-chunk (pos min max) | |
(mumamo-find-possible-chunk pos min max | |
'haml-mumamo-bw-exc-start-fun | |
'haml-mumamo-bw-exc-end-fun | |
'haml-mumamo-fw-exc-start-fun | |
'haml-mumamo-fw-exc-end-fun)) | |
(defun* haml-mumamo-exc-start-fun (pos lim max dir) | |
(if (or (null lim) (null max) (null pos)) (return)) | |
(flet ((check-lim () (when (> (point) max) (return)))) |
NewerOlder