Skip to content

Instantly share code, notes, and snippets.

View muhammadzaky15's full-sized avatar

muhammad zaky muhammadzaky15

View GitHub Profile
create table users (
id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) NOT NULL,
passowrd VARCHAR(100) NOT NULL,
status INT(1) DEFAULT 1,
alamat VARCHAR(225) NULL
);
<div className="w-1/4 mx-auto my-16">
<div className="w-full mb-4">
<label for="name" className="block">Nama</label>
<input type="text" name="name" id="name" className="w-3/4 rounded-lg h-8 border-gray border-2 border-gray-200" onChange={(e) => updateUser(e)}/>
</div>
<div className="w-full mb-4">
<label for="name" className="block">Email</label>
<input type="text" name="email" id="name" className="w-3/4 rounded-lg h-8 border-gray border-2 border-gray-200" onChange={(e) => updateUser(e)}/>
</div>
<div className="w-1/4 mx-auto my-16">
<div className="w-full mb-4">
<label for="name" className="block">Email</label>
<input type="text" name="email" id="name" className="w-3/4 rounded-lg h-8 border-gray border-2 border-gray-200" onChange={(e) => updateUser(e)} />
</div>
<div className="w-full mb-4">
<label for="name" className="block">Password</label>
<input type="password" name="password" id="name" className="w-3/4 rounded-lg h-8 border-gray border-2 border-gray-200" onChange={(e) => updateUser(e)} />
</div>
import { ShoppingCartOutlined, UserOutlined, SearchOutlined, DownOutlined } from "@ant-design/icons";
const MainMenu = (props) => {
return (<li className="inline-flex items-center">
{props.title}
{props.icon && <DownOutlined className="text-xs ml-1.5 text-green-500"/>}
</li>)
}
const Layout = function (props) {
@muhammadzaky15
muhammadzaky15 / tinymce-react-nextjs.md
Created October 18, 2020 14:35 — forked from zhangshine/tinymce-react-nextjs.md
NextJs- React - Self hosted TinyMCE
  1. Install (TinyMCE 5.x)
npm install --save tinymce @tinymce/tinymce-react copy-webpack-plugin
  1. Copy static files(tinymce skins) to public folder. Edit file next.config.js
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
@muhammadzaky15
muhammadzaky15 / nearby-coordinates.sql
Created September 13, 2019 07:45 — forked from statickidz/nearby-coordinates.sql
Ordering with SQL by nearest latitude & longitude coordinates (MySQL & SQLite)
---
METHOD 1
This should roughly sort the items on distance in MySQL, and should work in SQLite.
If you need to sort them preciser, you could try using the Pythagorean theorem (a^2 + b^2 = c^2) to get the exact distance.
---
SELECT *
FROM table
ORDER BY ((lat-$user_lat)*(lat-$user_lat)) + ((lng - $user_lng)*(lng - $user_lng)) ASC
const express = require('express');
const bodyParser = require('body-parser');
const passport = require('passport');
const jwt = require('jsonwebtoken');
const app = express();
app.use( bodyParser.urlencoded({ extended : false }) );
const router = express.Router();
@muhammadzaky15
muhammadzaky15 / package.js
Last active August 28, 2019 17:01
passportJS Tutorial
{
"name": "passport-jwt-tutorial",
"version": "1.0.0",
"description": "tutorial verify jwt dengan passportJS",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "muhammad.zaky.pnl@gmail.com",
"license": "ISC",