Skip to content

Instantly share code, notes, and snippets.

@sushengloong
sushengloong / list.md
Created November 27, 2020 15:43 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@sushengloong
sushengloong / interviewitems.MD
Created December 11, 2015 12:35 — 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
@sushengloong
sushengloong / log_sql_task.rake
Last active August 29, 2015 14:06
Log SQL Queries from Rake Task
desc "Task with SQL logging"
task test_log: :environment do
ActiveRecord::Base.logger = Logger.new STDOUT
# Your code here...
end
@sushengloong
sushengloong / gist:0b740fad6cef50db208f
Last active August 29, 2015 14:04
Build and install Vim 7.4 from source on CentOS
# 1. Remove existing installed vim packages
yum remove $(rpm -qa | grep ^vim)
# 2. Download VIM version 7.4
mkdir -p /opt/pkgs
cd /opt/pkgs
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
tar jxvf vim-*.tar.bz2
rm -f vim-*.tar.bz2
cd vim*
@sushengloong
sushengloong / gist:c3a83109d97dc57821cd
Last active August 29, 2015 14:03
ruby + passenger + apache
sudo -
export LANG=en_US.utf8
# on CentOS 6
yum install curl-devel httpd-devel
rvm get stable
rvm requirements --verify-downloads 1
@sushengloong
sushengloong / gist:37b85641cce48220681d
Created June 7, 2014 13:08
Plain Ruby date manipulation
Date manipulation
You can add or subtract days or month from a Date object:
+(n): add n number of days
-(n): subtract n number of days
>>(n): add n number of months
<<(n): subtract n number of months
@sushengloong
sushengloong / gist:249ea39945f2aae201e0
Created June 3, 2014 04:21
Find all database.yml recursively and print the absolute file path
find "`pwd`" -type f -name database.yml
@sushengloong
sushengloong / gist:aeab085abb02715138ec
Created May 30, 2014 08:26
Delete all files of a specific extension recursively in the current directory
find . -name "*.bak" -type f -delete
@sushengloong
sushengloong / gist:73959a574081c6bcfa2e
Created May 16, 2014 02:21
Profiling vim startup time
# Write startup timing messages to file
vim --startuptime vim.log
# Just print to standard output
vim --startuptime /dev/stdout +qall
@sushengloong
sushengloong / gist:11362729
Created April 28, 2014 05:54
Search Oracle Triggers/Procedures/Functions/Packages/Types by Code/Text
select * from user_source
where text like '%KEYWORD%';