Skip to content

Instantly share code, notes, and snippets.

View kieetnvt's full-sized avatar
👋

Kiet Nguyen kieetnvt

👋
View GitHub Profile
@kieetnvt
kieetnvt / docker-pry-rails.md
Created October 5, 2023 11:42 — forked from briankung/docker-pry-rails.md
Using pry-rails with Docker
@kieetnvt
kieetnvt / ec2-ftp-tutorial.md
Created April 3, 2021 02:48 — forked from tylermakin/ec2-ftp-tutorial.md
Tutorial for configuring FTP access to an EC2 server
@kieetnvt
kieetnvt / nginx-passenger-ssl.conf
Created March 25, 2021 15:47 — forked from rkjha/nginx-passenger-ssl.conf
Nginx/Passenger config when using SSL with a Ruby/Rails Application.
# for redirecting hhtp traffic to https version of the site
server {
listen 80;
server_name example.com;
return 301 https://$server_name$request_uri;
}
# for redirecting to non-www version of the site
server {
listen 80;
@kieetnvt
kieetnvt / README.md
Created December 25, 2020 09:15 — forked from bazzel/README.md
Webpacker and I18n
$ rails new my-i8n --webpack

Gemfile

gem 'i18n-js'
@kieetnvt
kieetnvt / ArrayObjectDemo.coffee
Created June 12, 2020 04:28 — forked from frane/ArrayObjectDemo.coffee
Traversing arrays and objects in CoffeeScript
# Traversing arrays and objects in CoffeeScript
# The array and object we use for testing
arr = [1, 2, 3, 4, 5]
obj = {a: 1, b: 2, c: 3, d: 4, e: 5}
# 'in' has a different meaning in CoffeeScript than in JavaScript
# CS: element in array -> JS: array.indexOf(element) >= 0
console.log '5 in arr: ' + (5 in arr)
@kieetnvt
kieetnvt / mac-build-pgmodeler.md
Created October 25, 2019 16:52 — forked from jdforsythe/mac-build-pgmodeler.md
Build pgmodeler on Mac with Homebrew-installed pg and openssl

Building pgmodeler for Mac

Check requirements at https://pgmodeler.io/installation.

You will need Qt 5.9.x installed, full XCode installed, and homebrew installation of postgres and openssl.

The example below is v10.5 of PG and v5.9.6 of Qt, modify accordingly. Also, replace {{USERNAME}} with you Mac username.

The installation is the same as the instructions at the link above. There are a few path differences due to homebrew installation locations.

@kieetnvt
kieetnvt / 00.howto_install_phantomjs.md
Created January 3, 2018 07:34 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
1) Create a linux user and set password
sudo adduser read_access
.. then enter your password for this user
2) Limit permission for the user (option)
.. normally, this user only has root permission on it's directory. (/home/read_access)
3) Set read-only role for this user to use Postgresql