Skip to content

Instantly share code, notes, and snippets.

/*
* @Author: Kriss Heimanis
* @Date: 2017-12-22 12:21:08
* @Last Modified by: Kriss Heimanis
* @Last Modified time: 2017-12-22 13:11:43
* Helper function to simplify conditional classNames.
* Accepts object as args.
* Object item key is the className, the value is the condition that must be met to include that className.
* Either item can be dynamic
@bitfidget
bitfidget / gist:0c37aa870adc3acafd46
Last active August 29, 2015 14:20
Angular Bootstrap Wishlist to work on

##Ultimate Angular Bootstrap Wishlist

###Services### #####Generic $http services

Covering full suite of rest calls and wired to chain success/error in correct manner with promises. eg.

POST(url/endpoint, data, successFunction, failFunction, name)

Where: name = simple variable to be injetced into success/fail error alerts.

@bitfidget
bitfidget / iHateAwsServers.md
Created July 29, 2014 03:14
setting up aws dev environment

firstly - yuck.

-- connect to server in terminal:

  • ssh userame@server

Enter password when prompted. If you need to chnage your password, at this point, enter:

  • passwd

#install coffee script in just one directory

npm install coffee-script

add a file to play with in coffee

touch hello.coffee

now to get coffee running

Why would you use Rails rather than another framework?
Ruby is a powerful yet simple programming language, but to build an app using Ruby on it's own would still be extremely time-consuming and difficult. Using a framework makes it possible to create an application or website in a very short time as most of the common tasks are already taken care of.
There are a number of Ruby frameworks to choose from, such as Sinatra (more a library than an actual framework but so what?) or Padrino but Rails provides a robust full-stack framework that makes it quick and easy to build scalable apps, and is particularly helpful if you are developing with a large team of people.
Some of the main advantages of Rails:
- Rails uses an MVC pattern
- Rails encourages use of RESTful routes
  1. look upstream on the vacancy map
  2. research the company
  3. contact/call/email/send cv - go for a coffee
  4. apply for a job!

Interview

  • due diligence - research the company
  • don't speak negatively about previous jobs

Computer Science Basics

read up on RVM - https://rvm.io/

stuff I gotta read

  • Functional JavaScript
  • mastering Regular Expressions
  • the little schemer (saved)

to pre compile your css and js for testing the live version locally

config/environments/production.rb - change to true

in console:

rake assets:precompile <- compiles all assets rails server -e production <- starts server in production state

to run on a different port

rspec testing rails

gems:

group :test, :development do gem 'rspec-rails' gem 'simplecov' gem 'factory_girl_rails' gem 'faker' gem 'shoulda-matchers'