Skip to content

Instantly share code, notes, and snippets.

@bitfidget
bitfidget / js_debugger_anywhere
Created April 3, 2014 01:55
a simple way of calling the debugger in JS regardless of scope
adding this to your javasript will allow you to initiate the debugger on demand, no matter where you arein your code by entering into the console window.ohNo
var window.ohNo = function(){
debugger;
};
genius!

rspec testing rails

gems:

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

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

Computer Science Basics

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

stuff I gotta read

  • Functional JavaScript
  • mastering Regular Expressions
  • the little schemer (saved)
  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
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

#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

@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
@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.