Skip to content

Instantly share code, notes, and snippets.

View nutchy's full-sized avatar
:octocat:

Chayanon Thongpila nutchy

:octocat:
View GitHub Profile
interface Shape {
getArea: () => number
}
class Circle implements Shape {
constructor(private radius: number = 0) {}
getArea() {
return Math.PI * this.radius * this.radius
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<template>
<b-container class="container-content form-container">
<div class="page-header">
<h4 class="page-header-text">{{ $t('pages.booking.book_one_time') }}</h4>
</div>
<b-row>
<b-col xl="6">
<b-row no-gutters class="custom-input-datetime">
<b-col cols="12">
<div v-if="isBookingOneTime">
let name = "Nutchy"
let age = 22
let obj = {
name,
age,
greeting() {
console.log(this.name + ', ' + this.age)
}
}
@nutchy
nutchy / es6_arrow_function.js
Last active June 9, 2019 11:28
Arrow function in es6
// 1. single line without return
function foo () {
console.log("Hello")
}
const foo = () => console.log("Hello")
// 2. single line with return
function foo () {
return "Hello"
export GOPATH=$HOME/Golang
alias python=python3
alias pip=pip3
alias sp=spotify
alias cl=clear
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
#pragma SMALL
#include <reg52.h>
sbit p10 = P1^0;
sbit p11 = P1^1;
sbit kr1 = P2^0;
sbit kr2 = P2^1;
sbit kr3 = P2^2;
sbit kr4 = P2^3;
sbit kc1 = P2^4;
sbit kc2 = P2^5;
@nutchy
nutchy / card.py
Last active October 25, 2018 08:09
""" Finding Card """
def cardAt(num):
"""
This function will return card at position num
Example :
==========================
| Input | Output |
==========================
| 0 | 2C |
| 1 | 3C |
"""Challenge: Month"""
def main(num):
"""
Print month name using number input
1 => January, 2 => Febuary, 3 => March, ... , 12 => December
"""
month_list = "01January02February03March04April05May06June07July08August09September10October11November12December13"
start = month_list.index("%02d" % (num)) + 2
end = month_list.index("%02d" % (num + 1))
print(month_list[start:end])
package countalphabet;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class CountAlphabet {