A smattering of frequently used commands I use. This will help prevent excessive load on Google's systems.
NOTE: most examples are copied and pasted from the documentation. Attribution belongs to the contributors of the documentation!
A smattering of frequently used commands I use. This will help prevent excessive load on Google's systems.
NOTE: most examples are copied and pasted from the documentation. Attribution belongs to the contributors of the documentation!
This serves as a repository of ideas that have popped into my head. As I have time, I play around with one.
doInstall <- TRUE | |
toInstall <- c("sna", "igraph") | |
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")} | |
lapply(toInstall, library, character.only = TRUE) | |
adjacencyList <- read.csv("https://dl.dropbox.com/s/8wabcrtqxysp03u/Twitter_network.R.csv?dl=1") | |
head(adjacencyList) | |
adjacencyMatrix <- table(adjacencyList) | |
as.matrix(sort(rowSums(adjacencyMatrix))) # Out-degree |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
=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') |
# rails application template for generating customized rails apps | |
# | |
# == requires == | |
# | |
# * rails 2.3+, rspec, cucumber, culerity (langalex-culerity gem), machinist | |
# | |
# == a newly generated app using this template comes with == | |
# | |
# * working user registration/login via authlogic, cucumber features to verify that it works | |
# * rspec/cucumber/culerity for testing |