Skip to content

Instantly share code, notes, and snippets.

View anaerobeth's full-sized avatar

Beth Tenorio anaerobeth

  • Healthie
  • Salem, NH
View GitHub Profile
@anaerobeth
anaerobeth / SAS on Demand
Last active December 15, 2015 08:48
Passion Driven Statistics - SAS on Demand
Setup a SAS OnDemand for Academics account
http://support.sas.com\ctx3\sodareg\index.html
Company Organization: Wesleyan University Middletown
Affiliation: Customer or User
Verify email account (This may take up to 1 day to process)
Log in to SAS on demand for academics
State:Connecticut.
Institution: Coursera School for Wesleyan University Middletown
@anaerobeth
anaerobeth / Vim Tips
Created April 5, 2013 15:07
Collection of vim tips and links
http://stackoverflow.com/questions/2573/vim-tutorials
y(ank) - copy
d(elete) - cut
c(hange) - replace
p(aste) - put from buffer after cursor
o(pen) - start a new line
i(nsert) - insert before current character
a(ppend) - insert after current character
w(ord) - moves to beginning of next word
http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-guide/
Plaintext Text Objects
Vim provides text objects for the three building blocks of plaintext: words, sentences and paragraphs.
Words
aw – a word (includes surrounding white space)
iw – inner word (does not include surrounding white space)
Opening a tumblr blog
Go to https://www.tumblr.com
Click Sign Up
Enter your email, password and username
Enter your age and click on agree button
Check your email and verify your account
Log in to your Tumblr
Add photos, text, links or whatever content you want by clicking on the icons
@anaerobeth
anaerobeth / Notes on Railscasts #48 Console Tricks
Last active December 19, 2015 22:19
Notes on Railscasts #48 Console Tricks (revised)
On the Terminal:
rails console #open a terminal window
rails c --sandbox #console session that is wrapped in a transaction and can be rolled back
rails c --production #start the app in the production environment
Console methods:
> app

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
function rails_pg() {
rails new $1 -T --database=postgresql &&
cd $1 &&
echo $1 > .ruby-gemset &&
echo 2.0 > .ruby-version &&
echo /config/database.yml >> .gitignore &&
cp config/database.yml config/database.example.yml &&
add_rails_gems &&
# spec/support/authentication_helper.rb
module AuthenticationHelper
def sign_in_as(user)
visit new_user_session_path
fill_in "Email", with: user.email
fill_in "Password", with: user.password
click_button "Sign in"
=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')
=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')