Skip to content

Instantly share code, notes, and snippets.

View vochicong's full-sized avatar
🐒
NLP/ML/AI

Cong vochicong

🐒
NLP/ML/AI
View GitHub Profile
Verifying that "vochicong.id" is my Blockstack ID. https://onename.com/vochicong
@vochicong
vochicong / gcloud_source_2_app_engine.md
Last active May 11, 2017 00:27
Deploy Rails app from Google Cloud Source Repo to App Engine

GCP ConsoleでCloud Source Repoに格納されているソースコードをApp Engineにデプロイする手順

Commands

gcloud source repos clone [REPO_NAME] [TARGET_DIR] --project=[PROJECT_ID]

where [REPO_NAME] is Cloud Source Repository name, [TARGET_DIR] is where to put the source code, and [PROJECT_ID] is App Engine Project ID.

@vochicong
vochicong / libraries-error-docker-gcloud-circleci.md
Created May 14, 2017 00:54
Libraries not found in GCP Docker when CircleCI deploying to GCP App Engine

CircleCI, GCP App Engineでライブラリが見つからないエラー

CircleCIからGCP App EngineへRailsアプリをデプロイする際、GCP Docker内で bundle exec rake assets:precompileが実行される時に libmysqlclient.so.20が見つからないエラーが出て、大変苦戦した。

原因

CircleCIは、deploymentフェーズの前に、testフェーズなどで 色々とやってくれているので、git commitされていない(deployには余計な?) ファイルがcurrent folderに大量生成される。

@vochicong
vochicong / cloudsql-rails.md
Last active May 14, 2017 02:35
Cloud SQL with Rails
$ pip install --upgrade pip
$ pip install --user --upgrade virtualenv
$ export PATH=~/.local/bin/:$PATH
$ which virtualenv
/home/ubuntu//.local/bin/virtualenv
// Edit this keymap file and save to apply.
[
{ "command": "findnext", "keys": { "win": [""] } },
{ "command": "navigate", "keys": { "win": ["Alt-E"] } },
{ "command": "goToNextError", "keys": { "win": [""] } },
{ "command": "tab0", "keys": { "mac": ["Alt-0"] } },
{ "command": "tab1", "keys": { "mac": ["Alt-1"] } },
{ "command": "tab2", "keys": { "mac": ["Alt-2"] } },
{ "command": "tab3", "keys": { "mac": ["Alt-3"] } },
{ "command": "tab4", "keys": { "mac": ["Alt-4"] } },
@vochicong
vochicong / disable-gcp-apt-get-warning.md
Created May 21, 2017 07:52
disable `apt get` warning o GCP Console

To disable atp get warning when using GCP Console.

mkdir ~/.cloudshell touch ~/.cloudshell/no-apt-get-warning

@vochicong
vochicong / sync_with_upstream.sh
Created July 6, 2017 15:02
Sync a fork of a repository to keep it up-to-date with the upstream repository.
# Sync a fork of a repository to keep it up-to-date with the upstream repository.
# https://help.github.com/articles/syncing-a-fork/
git fetch upstream
git checkout master
git merge upstream/master
git push
@vochicong
vochicong / mysql_macosx.md
Created August 10, 2017 00:05 — forked from jnoss/mysql_macosx.md
mysql on mac osx

Install and run mysql on mac os x

Instructions for installing mysql on mac os x via homebrew (a command line package manager for mac)

Install brew

Follow installation instructions at https://brew.sh/

Install mysql

Reset MySQL root password on Mac

On Terminal 1

mysql.server stop
mysqld_safe --skip-grant-tables

On Terminal 2