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 / .block
Last active July 30, 2016 20:57
realmedia
license: gpl-3.0
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<!-- ip-172-30-2-252 --- Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 --><div class="toprealmedia">
<div id="oas_Bottom1" class="realmediacontainer">
</div>
@hungvietdo
hungvietdo / .block
Last active July 22, 2016 18:17
selfcall
license: gpl-3.0
@hungvietdo
hungvietdo / README.md
Last active January 4, 2023 08:46
VI7: Node-link diagram and Adjacency matrix

Node-link Diagram

I added a new attribute to the dataset which is region.

In the node-link diagram, states in the same region likely stick together as they have links in between.

States in region which has less number of links spread out in the diagram. For example: look at the light-green color (South Atlantic), Florida is far apart with those states (DC, Maryland, Virginia, West Viginia, Delaware).

Thus, although the dataset is non-spatial, users can explore the relationship of nodes by looking the distance or number of hops in between.

@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
Last active February 23, 2016 01:23
Starbucks in Norfolk (mousehover)

##Rule of thumb ###Overview first, zoom and filter, details on demand

####Problem:

####Solution:

  • Just give an overview of information (positions of Starbucks).
  • Users can get detail information by hovering mouse to the point of data.
@hungvietdo
hungvietdo / README.md
Last active February 23, 2016 01:22
starbucks in Norfolk

##Rule of thumb ###Overview first, zoom and filter, details on demand

####Problem:

####Solution:

  • Just give an overview of information (positions of Starbucks).
  • Users can get detail information by hovering mouse to the point of data.