Skip to content

Instantly share code, notes, and snippets.

View FaisalAl-Tameemi's full-sized avatar

Faisal Al-Tameemi FaisalAl-Tameemi

View GitHub Profile
0x69b8Fb504E2eb0B2A8B6e5C1caF4ce6070c76BDB
@FaisalAl-Tameemi
FaisalAl-Tameemi / 00-js-foundations.md
Last active October 7, 2016 14:07
JS Fundamentals Review + NodeJS Modules Review / Examples.

JS Foundations

Topics:

  • Scopes in JS
  • Context (aka this) in JS
  • Callbacks Review
  • NodeJS Modules
  • NodeJS Automated Testing w. Mocha - time permits
@FaisalAl-Tameemi
FaisalAl-Tameemi / 01_functions_are_values.js
Last active October 6, 2016 21:38
Callbacks / Higher Order Functions Examples.
/**********************************************************************
Example 1: we can store a function like we store any other value.
In the example below, the function we are storing in `sumArray` is actually unnamed
which is to say it's an "annonymous" function.
**********************************************************************/
var sumArray = function(arr){
return arr.reduce(function(sum, elm){
return sum += elm;
@FaisalAl-Tameemi
FaisalAl-Tameemi / README.md
Last active September 19, 2016 17:14
CSS Box Model

CSS Box Model

Quick Review - CSS Syntax

Let's quickly review some of the basic syntax and anatomy of CSS code.

If we wanted to style all the divs on a given page with a height and width of 400px as well as a blue background, then our CSS code could be as follows:

@FaisalAl-Tameemi
FaisalAl-Tameemi / 01-02.py
Created September 18, 2016 22:18 — forked from dimi-tree/01-02.py
Udacity: Machine Learning for Trading
# Working with multiple stocks
"""
SPY is used for reference - it's the market
Normalize by the first day's price to plot on "equal footing"
"""
import os
import pandas as pd
import matplotlib.pyplot as plt
@FaisalAl-Tameemi
FaisalAl-Tameemi / http.md
Created August 8, 2016 02:10
Intro To HTTP Notes

Introduction to HTTP

Starting from the top...

require './bartender.rb'
require './restaurant.rb'
require './review.rb'
describe Bartender do
before :each do
@bartender = Bartender.new('John', 6)
end
describe '.new' do
@FaisalAl-Tameemi
FaisalAl-Tameemi / employee.rb
Last active August 4, 2016 21:36
ORM Breakout Notes
class Employee < ActiveRecord::Base
BILLABLE_HOURS = 1950
belongs_to :store
validates :first_name, :last_name,
presence: true
after_create :increment_employees_count
after_destroy :decrement_employees_count

In the code below, is person is an Object or Class or Constructor? What's the difference ?

function Person(name,age) {
  this.name = name;
  this.age = age;
}

// a function that prints the name of any given person
var printPersonName = function (p) {
@FaisalAl-Tameemi
FaisalAl-Tameemi / cellphone.rb
Created July 27, 2016 00:04
OOP Electronics Store Example
class Cellphone < Product
def initialize(name, price, brand)
super
end
end