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 / schema.prisma
Last active October 2, 2024 14:28
261207 - Lecture 21 - Prisma schema sample for MongoDB
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init
generator client {
provider = "prisma-client-js"
}
@potikanond
potikanond / mariadb-galera.yml
Created January 29, 2021 09:28
docker-compose file for Mariadb Cluster deployment using Galera
version: '3.5'
services:
seed:
image: colinmollenhour/mariadb-galera-swarm:10.4.11-2020-01-06
environment:
- XTRABACKUP_PASSWORD_FILE=/run/secrets/xtrabackup_password
- MYSQL_USER=dpotikan
- MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
- MYSQL_DATABASE=database
@potikanond
potikanond / 3d_scatterplot.py
Last active March 30, 2020 06:05
Basic gene expression analysis
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
fig = plt.figure(figsize=(8,6))
ax = fig.add_subplot(111, projection='3d')
ax.scatter(gxp['1Hrs'],gxp['2Hrs'],gxp['3Hrs'], c='r', s=40)
ax.set_xlabel('1Hrs')
@potikanond
potikanond / e.html
Created February 27, 2020 08:57
simple app
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Expense Tracker</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
@potikanond
potikanond / App.css
Last active March 3, 2020 05:59
React Todos App
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.4;
}
@potikanond
potikanond / index.html
Last active February 11, 2020 06:03
Bookmark SPA - HTML template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>MyBookList App</title>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
@potikanond
potikanond / Members.js
Last active February 4, 2020 05:27
Simple Node Tutorial
// 4 - Array of member objects
const members = [
{
id: 1,
name: 'John Doe',
email: '[email protected]',
status: 'active'
},
{
id: 2,
@potikanond
potikanond / score-card.js
Last active February 14, 2020 10:25
CPE Project Scorecard
$(document).ready(function(){
$("#myBtn").click(function(){
$("#myModal").modal();
});
$(".form-control").change(validateCell);
$("#btn-save").click(saveScores);
$("#copy-score").click(copyScores);
@potikanond
potikanond / index.html
Created January 21, 2020 03:29
JavaScript - Filterable List (HTML template)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
@potikanond
potikanond / index.html
Created January 21, 2020 03:24
JavaScript - Weight Converter App (HTML template)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">