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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Stripe Getting Started Form</title> | |
| <!-- The required Stripe lib --> | |
| <script type="text/javascript" src="https://js.stripe.com/v2/"></script> | |
| <!-- jQuery is used only for this example; it isn't required to use Stripe --> |
| <%= f.collection_check_boxes :venue_ids, Venue.all, :id, :name, checked: Venue.all.map(&:id) do |b| %> | |
| <span> | |
| <%= b.check_box %> | |
| <%= b.label %> | |
| </span> | |
| <% end %> |
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
| // layout file | |
| <body> | |
| <div class="container"> | |
| <%= flash_messages %> | |
| <%= yield %> | |
| </div><!-- /container --> | |
| </body> |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
| <% if current_user -%> | |
| <script> | |
| mixpanel.identify('<%= @current_user.id %>'); | |
| mixpanel.register(<%= raw JSON.generate(MixHelp.user_supers(@current_user, 'event')) %>); | |
| mixpanel.name_tag('<%= @current_user.display_name %>'); | |
| mixpanel.people.set(<%= raw JSON.generate(MixHelp.user_supers(@current_user, 'people')) %>); | |
| </script> | |
| <% end -%> |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ cd ~/.ssh | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| require 'rubygems' | |
| require 'aws-sdk' | |
| s3 = AWS::S3.new( | |
| :access_key_id => 'XXXXXXXXXXXXXXX', | |
| :secret_access_key => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') | |
| bucket = s3.buckets['your_bucket_name'] | |
| ten_year_in_seconds = 10 * 365 * 24 * 60 * 60 |
| # Custom rspec matcher for testing CanCan abilities. | |
| # Originally inspired by https://github.com/ryanb/cancan/wiki/Testing-Abilities | |
| # | |
| # Usage: | |
| # should have_abilities(:create, Post.new) | |
| # should have_abilities([:read, :update], post) | |
| # should have_abilities({manage: false, destroy: true}, post) | |
| # should have_abilities({create: false}, Post.new) | |
| # should not_have_abilities(:update, post) | |
| # should not_have_abilities([:update, :destroy], post) |