Skip to content

Instantly share code, notes, and snippets.

View potikanond's full-sized avatar

D. Potikanond potikanond

  • Computer Engineering, CMU
  • Thailand
View GitHub Profile
@potikanond
potikanond / README.md
Last active August 27, 2018 15:14
How to add SSH key to GitHub

How to add SSH key to GitHub

Generate a SSH key

$ ssh-keygen

This will generate ssh private/public key inside the ~/.ssh/.

@potikanond
potikanond / README.md
Last active August 28, 2018 06:38
How to access VirtualBox shared folder from Ubuntu Server VM
@potikanond
potikanond / README.md
Last active January 12, 2023 12:30
Example#3.2: build a simple Node.js app image
@potikanond
potikanond / README.md
Last active August 31, 2018 08:27
Example#3.5: Jekyll developer environment
@potikanond
potikanond / README.md
Last active August 31, 2018 08:33
Example#3.6: Automate the deployment of reverse proxy+web app

Example#3.6: Automate the deployment of reverse proxy+web app

Create a project directory on a host

First, we need to create a directory example36 on the host.

$ mkdir example36
$ cd example36
@potikanond
potikanond / README.md
Last active August 31, 2018 08:37
Example#7: Automate the deploy Drupal+postgres app process

Example#3.7: Automate the deployment of Drupal+postgres app process

Create a project directory and the YAML file

Create a directory named example37 and the example37/docker-compose.yml file.

We will create drupal and postgres services. The drupal container is created with four mounted named volumes for four different drupal's directories: modules, profiles, sites and themes.

The postgres containers is created with postgres admin password of 1234.

@potikanond
potikanond / main.js
Last active March 21, 2019 06:41
Starting code - JavaScript Array and High-order functions
// Add the following element at the end of <body> element in an html file
// <script src="main.js"></script>
const companies= [
{name: "Company One", category: "Finance", start: 1981, end: 2004},
{name: "Company Two", category: "Retail", start: 1992, end: 2008},
{name: "Company Three", category: "Auto", start: 1999, end: 2007},
{name: "Company Four", category: "Retail", start: 1989, end: 2010},
{name: "Company Five", category: "Technology", start: 2009, end: 2014},
{name: "Company Six", category: "Finance", start: 1987, end: 2010},
@potikanond
potikanond / style.css
Created March 15, 2019 08:37
A Style sheet for JavaScript crash course
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.6;
}
@potikanond
potikanond / Members.js
Last active January 20, 2020 15:21
Members - Arrays of objects in JavaScript and JSON
const members = [
{
id: 1,
name: 'John Doe',
email: '[email protected]',
status: 'active'
},
{
id: 2,
name: 'Bob Williams',
@potikanond
potikanond / index.html
Created March 25, 2019 05:59
Filterable list app - <ul> part of index.html
<ul id="names" class="collection with-header">
<li class="collection-header">
<h5>A</h5>
<li class="collection-item">
<a href="#">Abe</a>
</li>
<li class="collection-item">
<a href="#">Atom</a>
</li>
<li class="collection-item">