Skip to content

Instantly share code, notes, and snippets.

class TTTGame {
constructor() {
this.board = [[null,null,null],[null,null,null],[null,null,null]]
this.currentTurn = 'x'
this.gameState = true
}
reset() {
this.board = [[null,null,null],[null,null,null],[null,null,null]]
this.currentTurn = 'x'
class Triangle
attr_reader :number_of_rows
def initialize(number_of_rows)
@number_of_rows = number_of_rows
end
def rows
if number_of_rows == 1
[[1]]
# O(n^2)
def dedupe(sorted_array)
previous_values = []
sorted_array.map do |element|
if previous_values.include? element
next
else
previous_values << element
element
@abrahamsangha
abrahamsangha / bootstrap_summary
Created May 12, 2014 22:23
bootstrap_summary
======= Bootstrap Summary =======
** Repo specific configuration **
harbard
- Successfully cloned repo
- Successfully added asset to repoman
- Problem running 'bundle check || bundle install'
- Successfully ran powder link
- Problem running bootstrap.sh
Started GET "/" for 127.0.0.1 at 2014-03-25 14:07:33 -0500
Processing by SearchesController#index as HTML
Redirected to http://localhost:3001/users/auth/sso
Filter chain halted as :ensure_session rendered or redirected
Completed 302 Found in 0ms
Started GET "/users/auth/sso" for 127.0.0.1 at 2014-03-25 14:07:33 -0500
(sso) Request phase initiated.
#------------------------------------------------------------
# GoToBilling Ruby on Rails Plugin v1.0
# Compatible with version 3.0.2 of the GoToBilling Gateway
#------------------------------------------------------------
require 'net/http'
require 'net/https'
require 'cgi'
module GoToBillingLibrary
@abrahamsangha
abrahamsangha / .bash_profile
Last active December 24, 2015 15:19
Bash profile
export PATH="/usr/local/bin:$PATH"
export PGHOST=localhost
export GIT_PS1_SHOWDIRTYSTATE=true
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`

##Abraham Sangha, web developer

Email
Web
GitHub
Phone: 617.446.3630

###/Pro.file

I am an engineer in search of a junior web developer position.

Mar 2nd, 2009

An efficient workflow for developers in Agile teams that handles features and bugs while keeping a clean and sane history.

At Hashrocket we use git both internally and in our Agile mentoring and training. Git gives us the flexibility to design a version control workflow that meets the needs of either a fully Agile team or a team

API Reference

The Dev Bootcamp (DBc) API is designed on REST principles. Our approach entails simple, descriptive URLs used to obtain resources. We use HTTP features, such as the HTTP verb GET, HTTP Secure, and HTTP response codes for API errors. Successful API calls will result in JSON responses. Hopefully these engineering choices enable developers to maximize their productivity.

The Dev Bootcamp API allows authenticated users to access select data such as a student's social media urls, a cohort's Socrates submissions, or a Dev Bootcamp location's total number of students. This data can be used to create applications that leverage DBc info into useful creations limited only by a developer's imagination.

API Authentication and Authorization

The DBc API uses OAuth 2.0 through [DBc Auth](http