git init
or
| After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
| The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
| brew unlink postgresql | |
| brew install postgresql@9.6 | |
| brew unlink postgresql@9.6 | |
| brew link postgresql |
| /* | |
| TODO: | |
| X Maybe account for defaults: color: var(--header-color, blue); | |
| - Verify cross domain working or not (it is working from dropbox) | |
| - Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns | |
| - Need to test on a more complex CSS file | |
| - Option to save parsed file in local/session storage so there isn't a delay on additional page loads. Could only do it for links (with URLs to use as keys) and style blocks with IDs of some sort | |
| - Need to test more complex values like rgba(255,0,0,0.5); and something with !important | |
| - Try multiple links | |
| - Local links |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
| require 'resque/tasks' | |
| namespace :resque do | |
| def del(key) | |
| Resque.redis.keys(key).each { |k| Resque.redis.del(k) } | |
| end | |
| desc "Resque setup according to installation guide" | |
| task :setup => :environment |
| # .railsrc | |
| -B #Skip Bundle | |
| -T #Skip Test-Unit | |
| -d postgresql #Use postgres |
| # This is a skeleton for testing models including examples of validations, callbacks, | |
| # scopes, instance & class methods, associations, and more. | |
| # Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
| # | |
| # I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
| # so if you have any, please share! | |
| # | |
| # This skeleton also assumes you're using the following gems: | |
| # | |
| # rspec-rails: https://github.com/rspec/rspec-rails |
| # code inspired from http://jainmarket.blogspot.com/2009/05/creating-custom-table-view-cell.html | |
| class CustomCell < UITableViewCell | |
| attr_accessor :primaryLabel | |
| attr_accessor :secondaryLabel | |
| def createLabels | |
| @primaryLabel = UILabel.alloc.init |
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |
| # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
| # 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
| # https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
| # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
| gem install bundler | |
| # 1. Get edge Rails source (master branch) | |
| git clone https://github.com/rails/rails.git |