This markdown file aims to explain what each mod dependencies do and what they're useful for, then later compared in a table with features.
FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on newsnews.ycombinator.com. I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
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
| import React from 'react'; | |
| import { View, StyleSheet, ActivityIndicator } from 'react-native'; | |
| import { FlatList } from '../searchBarAnimation'; | |
| import { List, ListItem } from 'react-native-elements'; | |
| export default class Tab extends React.PureComponent { | |
| constructor(props) { | |
| super(props); | |
| this.state = { |
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
| // go to your account Likes page and run this in the console: | |
| function scrollToLoadMore() { | |
| // keep scrolling if twitter tries to stop loading more. | |
| // scroll up, then down to force infinite load. | |
| window.scrollTo(0, 0); | |
| setTimeout(function() { | |
| window.scrollBy(0, 9999999999); | |
| }, 200); | |
| } |
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
| #include <SoftwareSerial.h> | |
| // Pin definitions | |
| const int rfid_irq = 0; | |
| const int rfid_tx_pin = 6; | |
| const int rfid_rx_pin = 7; | |
| // For communication with RFID module | |
| SoftwareSerial rfid(rfid_tx_pin, rfid_rx_pin); | |
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
| module Shoulda # :nodoc: | |
| module ActiveRecord # :nodoc: | |
| # Examples: | |
| # class Book < ActiveRecord::Base | |
| # named_scope :test, :conditions => { :name => "test" } | |
| # named_scope :by_name, lambda { |n| { :conditions => { :name => n} } } | |
| # end | |
| # | |
| # RSpec: |
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
| RSpec::Matchers.define :allow do |*values| | |
| match do |record| | |
| values.collect {|value| | |
| record.send("#{@attribute}=", value) | |
| record.valid? | |
| record.errors[@attribute].empty? | |
| }.all? | |
| end | |
| chain :as do |attribute| |
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
| ENV["RAILS_ENV"] = "test" | |
| require File.expand_path(File.dirname(__FILE__) + '/../../config/environment') | |
| require 'shoulda' | |
| require 'webrat' | |
| require 'factory_girl' | |
| require 'test/factories/clearance' | |
| require 'clearance/../../shoulda_macros/clearance' | |
| require 'cucumber/rails/world' | |
| Cucumber::Rails.use_transactional_fixtures | |
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
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; | |
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
| def wait_for_ajax(timeout=5000) | |
| js_condition = "selenium.browserbot.getCurrentWindow().jQuery.active == 0" | |
| selenium.wait_for_condition(js_condition, timeout) | |
| end |
NewerOlder