Skip to content

Instantly share code, notes, and snippets.

View hungvietdo's full-sized avatar

Hung Do hungvietdo

View GitHub Profile
@hungvietdo
hungvietdo / sphp.sh
Created February 8, 2022 11:19 — forked from rhukster/sphp.sh
Easy Brew PHP version switching
#!/bin/bash
# Creator: Phil Cook
# Modified: Andy Miller
osx_major_version=$(sw_vers -productVersion | cut -d. -f1)
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2)
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3)
osx_patch_version=${osx_patch_version:-0}
osx_version=$((${osx_major_version} * 10000 + ${osx_minor_version} * 100 + ${osx_patch_version}))
homebrew_path=$(brew --prefix)
brew_prefix=$(brew --prefix | sed 's#/#\\\/#g')
@hungvietdo
hungvietdo / ApacheHTTPSConfig.md
Created January 6, 2019 15:37 — forked from nrollr/ApacheHTTPSConfig.md
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using Terminal.app: sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

@hungvietdo
hungvietdo / automobile.ipynb
Created September 22, 2017 03:17 — forked from martinwicke/automobile.ipynb
Estimator demo using Automobile dataset
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hungvietdo
hungvietdo / data.csv
Created February 27, 2016 19:56 — forked from d3noob/.block
Simple d3.js Graph
date close
1-May-12 58.13
30-Apr-12 53.98
27-Apr-12 67.00
26-Apr-12 89.70
25-Apr-12 99.00
24-Apr-12 130.28
23-Apr-12 166.70
20-Apr-12 234.98
19-Apr-12 345.44
@hungvietdo
hungvietdo / README.md
Created February 1, 2016 02:55
ICW2: Football data analysis

Team Members: Srinivas Havanur Erika Siregar Hung Do Assignment: ICW2: Football data analysis

Course: Information Visualization

Semester: Spring 2016

@hungvietdo
hungvietdo / README.md
Last active January 30, 2016 14:31 — forked from weiglemc/.block
Bar chart practice

My notes

Edit of mbostock's DRY Bar Chart

A variation of the example bar chart using a slightly more D.R.Y. style. The visual encoding is represented by two functions and their composition:

  • The value accessor returns the value (or property) to encode for a given data object.
  • The scale maps this value to a visual display encoding, such as a pixel position.
@hungvietdo
hungvietdo / README.md
Created January 21, 2016 04:49 — forked from weiglemc/README.md
Murray example