Skip to content

Instantly share code, notes, and snippets.

View alvinkatojr's full-sized avatar

Alvin Kato J.R. alvinkatojr

View GitHub Profile
@alvinkatojr
alvinkatojr / interviewitems.MD
Created August 23, 2016 05:30 — forked from amaxwell01/interviewitems.MD
My answers to over 100 Google interview questions

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@alvinkatojr
alvinkatojr / ml-ruby.md
Created May 6, 2016 13:10 — forked from gbuesing/ml-ruby.md
Resources for Machine Learning in Ruby

Resources for Machine Learning in Ruby

Gems

@alvinkatojr
alvinkatojr / upgrade-npm.sh
Created April 19, 2016 00:42 — forked from ohall/upgrade-npm.sh
Update NPM to latest version
npm --version #2.1.11
npm install -g npm@latest
npm --version #2.7.3
# if npm ERR! UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm config set strict-ssl false
@alvinkatojr
alvinkatojr / gist:70a841a903dffccbab07
Created March 10, 2016 01:21 — forked from alex-zige/gist:5795358
Rails Rspec API Testing Notes

Rails Rspec APIs Testing Notes

Folders Structure

  spec
  |--- apis #do not put into controllers folder. 
        |--- your_api_test_spec.rb  
  |--- controllers
  |--- models
  |--- factories
 |--- views
# In your test_helper.rb
class ActiveRecord::Base
mattr_accessor :shared_connection
@@shared_connection = nil
def self.connection
@@shared_connection || retrieve_connection
end
end
@alvinkatojr
alvinkatojr / solr.textile
Last active August 29, 2015 14:27 — forked from kathgironpe/solr.textile
Install Tomcat 6 and Solr on Mac OS X.

SolR and Tomcat

1. Install Tomcat on Mac

Sources: 
http://www.malisphoto.com/tips/tomcatonosx.html

http://wiki.apache.org/solr/SolrTomcat
@alvinkatojr
alvinkatojr / gist:4eb902bd3ee98156cc91
Last active August 29, 2015 14:26
Disable Sketch 3 auto-save
defaults write com.bohemiancoding.sketch3 ApplePersistence -bool no
@alvinkatojr
alvinkatojr / osx-homebrew-setup.md
Last active August 29, 2015 14:25 — forked from sr75/osx-homebrew-setup.md
Mac Yosemite OSX - Homebrew (RVM/MySQL/Redis) setup

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:

XQuartz

Recommended to download latest XQuartz

iTerm2

class Meal
def initialize(meal_cost, tax_rate, tip_rate)
@meal_cost = meal_cost
@tax_rate = tax_rate
@tip_rate = tip_rate
end
def calculate_percentage_rate(amount, rate)
return amount.to_f * rate/100

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:

$ npm update npm -g