⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
require 'oauth/consumer' | |
require 'net/http/post/multipart' | |
OAuth::VERSION = 1.0 | |
consumer = OAuth::Consumer.new('consumer_key', 'consumer_secret', | |
:site => 'http://provider.example.com', | |
:request_token_path => '/request_token', | |
:authorize_path => '/authorize', | |
:access_token_path => '/access.token') |
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
Hint: I also mad an octave docset for Dash: https://github.com/obstschale/octave-docset
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
require "nokogiri" | |
require "open-uri" | |
def etsy_results(product) | |
url = "https://www.etsy.com/search?q=#{product}" | |
file = open(url) | |
doc = Nokogiri::HTML(file) | |
results = [] | |
doc.search(".card-meta").each do |item| |
13/01/2016
- Ransack, AA engine, by MAS
- Remove old kernel version, by VIT
- Beautifull routes, by WAS
- DateTime and Time helpers, by FRB
16/01/2016
- Active Record tricks, by WAS
- Presenter/meta-methods, by VIT
- SOLR - specific full search, by FRB
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
Idea for AI Project "Our future will be written in code." | |
1) Take a book in electronic format like a Jane Austen book from project Gutenberg. Take the last chapter in that book. Remove all the spaces. | |
Now write a computer program to put all the spaces back. You can easily count how many it got right since you have the original text. | |
1. Do it using Hidden Markov Models based on a frequency dictionary of English. | |
2. Do it using a Genetic Algorithm using an oracle based on the same frequency dictionary. |