Skip to content

Instantly share code, notes, and snippets.

View moomdate's full-sized avatar
🍋
~/.profile

moomdate moomdate

🍋
~/.profile
  • bangkok
View GitHub Profile
@moomdate
moomdate / container_ip.bash
Created May 30, 2020 07:26 — forked from zainengineer/container_ip.bash
Get docker container ip
#!/usr/bin/env bash
#inside docker container
HOST_IP=$(/sbin/ip route|awk '/default/ { print $3 }')
CONTAINER_IP=$(curl "$HOST_IP:8000" 2>/dev/null)
echo "container ip is $CONTAINER_IP"
let cards = [];
let amountOfCard = 7;
multiple = 1;
cards.push([1]);
for (let i = 1; i < amountOfCard; i++) {
// create main number
// create card
multiple = multiple * 2;
let prepare = multiple;
let data1 = []
let data2 = []
//let data3 = data1.concat(data2);
let uqi = data2.filter(data=>{
return !data1.find(x=>x.courseId == data.courseId)
})
let data3 = data1.concat(uqi)
var header = Array();
var jsonData = {};
var temp_courseId,temp_coureCode,temp_courseName;
var courseObject = [];
$("html body table tbody tr td table tbody tr td font").each(function (i, v) {
if ($(this).attr("size") == "2") {
let data = $(this).first().context.textContent;
if (data.length < 15) {
let url = $(this).context.innerHTML
let arrObj = url.split("&amp;");
@moomdate
moomdate / java_vs_kotlin.md
Created April 19, 2020 07:43 — forked from AnthonyNahas/java_vs_kotlin.md
Java vs Kotlin - the quick comparison

1. Types and Operators

Java

// variable
int x = 1;

// constant
final int y = 2; 
@moomdate
moomdate / ex.go
Created November 24, 2019 03:07
without pointer
package main
import "fmt"
type Student struct {
id string
name string
age int
}
@moomdate
moomdate / myApp.js
Created November 23, 2019 02:52
Examle vdom in react
import React, { Component } from "react";
import "./App.css";
class example extends Component {
constructor(props) {
super(props);
this.state = { data: 0 };
this.run = this.run.bind(this);
}
import React, { Component } from "react";
import "./App.css";
class example extends Component {
constructor(props) {
super(props);
this.state = { data: 0 };
this.run = this.run.bind(this);
}
"use strict";
const line = require("@line/bot-sdk");
const express = require("express");
const config = require("./config.json");
const axios = require("axios");
// create LINE SDK client
const client = new line.Client(config);
const app = express();
#include<string.h>
#include<stdio.h>
#define true 1
#define flase 0
typedef int bool;
bool isPalindrome(char*);
void findPalindrome(char * dataInput);
int main(){
char * input = "1123456";