Skip to content

Instantly share code, notes, and snippets.

View fahmiegerton's full-sized avatar
🕳️
tired from all of this

Arif Fahmi fahmiegerton

🕳️
tired from all of this
View GitHub Profile
@fahmiegerton
fahmiegerton / kueriapotek.sql
Last active March 12, 2019 13:32
Kueri Apotek PostgreSQL
-- kueri hanya bisa dipakai di PostgreSQL (versi 10 keatas)
-- cara jalaninnya blok dulu kuerinya baru tekan f5
-- contoh: blok yg ini => select * from obat; <= lalu tekan f5
-- nb: sql itu gak case-sensitive (maksudnya huruf besar kecil gak papa).
-- tipe data 'serial' sama fungsinya seperti 'AUTO_INCREMENT' di MySQL, bedanya serial itu ada di Postgres.
-- kalau di Microsoft SQL Server, tipe datanya 'Identity'. Di Oracle mboh.
-- jadi, setiap ada kolom yang di input, kolom dengan tipe data 'serial' akan otomatis bertambah nilainya.
@fahmiegerton
fahmiegerton / kueriapotekoracle.sql
Last active May 15, 2019 01:28
Kueri Apotek OracleDb
create table pelanggan (
IdPel varchar2(5) not null primary key,
NamaPel varchar2(50) not null,
Alamat varchar2(100) not null,
JenKel varchar2(1) not null,
Umur varchar(3),
NoHp varchar(15)
);
select * from pelanggan;
CREATE DATABASE db_apotek;
USE db_apotek;
CREATE TABLE pelanggan (
IdPel VARCHAR(5) NOT NULL PRIMARY KEY,
NamaPel VARCHAR(50) NOT NULL,
Alamat VARCHAR(100) NOT NULL,
JenKel VARCHAR(1) NOT NULL,
Umur VARCHAR(3),
NoHp VARCHAR(15)
<!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>Sassy Test</title>
<link href="vendor/css/theme.css" rel="stylesheet">
</head>
<body>
@fahmiegerton
fahmiegerton / apotekdataoracle.sql
Last active May 15, 2019 01:29
Insert data to tables on oracle db
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0001','Adam Raki','Teritip','L','20','082255150');
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0002','Hanna Montana','Kampung Baru Ujung','P','24','058822402');
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0003','Miley Cyrus','Gunung Bakaran','P','29','085521251');
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0004','Taylor Swift','Lamaru','P','26','082151561');
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0005','Charlie Puth','Gunung Bubukan Atas','L','23','081215100');
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0006','Bill Gates','Martadinata','L','65','082564512');
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0007','John Scott','BDS 1','L','32','098123156');
INSERT INTO Pelanggan(IdPel, NamaPel, Alamat, JenKel, Umur, NoHp) VALUES('P0008','Michael Solely'
@fahmiegerton
fahmiegerton / uts.sql
Last active May 4, 2020 14:59
hiyahiyahiya
--Soal 1
create table Dokter (
IdDokter varchar2(3) not null,
IdSpesialis varchar2(3) not null,
Nama varchar2(150) not null,
JenisKelamin varchar2(15) not null,
Telepon varchar2(15) not null
);
create table Pasien (
--merelasikan table kasir dengan tabel penyakit
-- Kasir => transaksi => obat => penyakit
--Merelasikan semua tabel
select * from kasir inner join transaksi on transaksi.idkasir=kasir.idkasir
inner join obat on obat.idobat=transaksi.idobat
inner join penyakit on penyakit.idpenyakit=obat.idpenyakit
inner join pelanggan on pelanggan.idpel=transaksi.idpel
inner join jenis on jenis.idjenis = obat.idjenis;
@fahmiegerton
fahmiegerton / ActivityRecord.vue
Last active July 29, 2019 00:28
BootstrapVue Table with Modal - PIA0918el
<template>
<div class="tabel">
<b-container fluid>
<!-- Tabel -->
<b-table hover responsive :fields="fields" :items="items">
<!-- A virtual column -->
<template slot="num" slot-scope="data">{{ data.num + 1 }}</template>
<template slot="study_evaluation" slot-scope="row">
<b-button
<?php
declare(strict_types=1);
use DI\ContainerBuilder;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Monolog\Processor\UidProcessor;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
@fahmiegerton
fahmiegerton / notes.txt
Created May 29, 2020 15:39
Cara deploy Nuxtjs App (Universal Mode) ke GitHub Pages
//install push-dir
yarn add gh-pages cross-env --save-dev
//buka file .env dan tambahkan ini
DEPLOY_ENV=GH_PAGES
//tambahkan command di package.json
"build:gh-pages": "cross-env DEPLOY_ENV=GH_PAGES nuxt build",
"generate:gh-pages": "cross-env DEPLOY_ENV=GH_PAGES nuxt generate",
"deploy": "gh-pages -d dist"