Skip to content

Instantly share code, notes, and snippets.

View ak1103dev's full-sized avatar
🎯
Focusing

Apichan Chaiyutthasat ak1103dev

🎯
Focusing
View GitHub Profile
@ak1103dev
ak1103dev / meta.json
Last active January 18, 2022 04:29
meta mock
{
"site_name": "YouTube",
"url": "https://www.youtube.com/watch?v=cWDdd5KKhts",
"title": "Cheese Shop Sketch - Monty Python's Flying Circus",
"image": {
"url": "https://i.ytimg.com/vi/cWDdd5KKhts/maxresdefault.jpg"
},
"description": "Subscribe to the Official Monty Python Channel here - http://smarturl.it/SubscribeToPython Cleese plays an erudite customer attempting to purchase some chees...",
"type": "video",
"video": [
@ak1103dev
ak1103dev / data.txt
Created January 15, 2022 03:11
carlist
?({"Makes":[{"make_id":"abarth","make_display":"Abarth","make_is_common":"0","make_country":"Italy"},{"make_id":"ac","make_display":"AC","make_is_common":"0","make_country":"UK"},{"make_id":"acura","make_display":"Acura","make_is_common":"1","make_country":"USA"},{"make_id":"alfa-romeo","make_display":"Alfa Romeo","make_is_common":"1","make_country":"Italy"},{"make_id":"allard","make_display":"Allard","make_is_common":"0","make_country":"UK"},{"make_id":"alpina","make_display":"Alpina","make_is_common":"0","make_country":"UK"},{"make_id":"alpine","make_display":"Alpine","make_is_common":"0","make_country":"Germany"},{"make_id":"alvis","make_display":"Alvis","make_is_common":"0","make_country":"UK"},{"make_id":"amc","make_display":"AMC","make_is_common":"0","make_country":"USA"},{"make_id":"ariel","make_display":"Ariel","make_is_common":"0","make_country":"UK"},{"make_id":"armstrong-siddeley","make_display":"Armstrong Siddeley","make_is_common":"0","make_country":"UK"},{"make_id":"ascari","make_display":"Ascar
import React, { useState } from 'react'
import { useHistory } from 'react-router-dom'
import { useForm } from 'react-hook-form';
import styled from '@emotion/styled'
import request from '../../utils/request'
const Container = styled.div`
text-align: center;
`
<!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>email template</title>
<style>
table, tr, td {
/* border: 1px solid black; */
import React, { useState } from 'react';
import Hook from './Hook'
import './App.css';
function App() {
const [isLifecycle, setIsLifecycle] = useState(false)
return (
<div className="App">
<button onClick={() => setIsLifecycle(!isLifecycle)}>
import React, { useState } from 'react';
import Lifecycle from './LifeCycle'
import './App.css';
function App() {
const [isLifecycle, setIsLifecycle] = useState(true)
return (
<div className="App">
<button onClick={() => setIsLifecycle(!isLifecycle)}>
Switch
import axios from 'axios'
const KEY = 'motlin-token'
const CLIENT_ID = '<my_client_id>'
const instance = axios.create({
baseURL: 'https://api.moltin.com/v2'
});
const implicitLogin = async () => {
const formData = new FormData()
formData.append('client_id', process.env.REACT_APP_MOTLIN_CLIENT_ID || CLIENT_ID)
class Example extends Component {
constructor(props) {
super(props)
this.state = {
time: 100, // 100 second
}
this.setIntervalObj = setInterval(() => {
this.setState(({ time }) => ({ time: time - 1 }))
}, 1000)
}
{
"name": "Hello",
"gender": "male"
}
<!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>Sample Portfolio</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
<style>
.full-height {