Skip to content

Instantly share code, notes, and snippets.

View jufianto's full-sized avatar

Jufianto Henri jufianto

View GitHub Profile
@jufianto
jufianto / config.php
Created December 31, 2020 07:32
CodeIgniter 3 Setting
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);/'
$config['index_page']='';
@jufianto
jufianto / regex.txt
Created October 17, 2020 08:39
Regex Learn by Jufi
^([1-9]|[12]\d|3[01])$ -> untuk setingan value harus dalam bentuk angka hari 1-31
^([1-9]|1[0-2])$ => untuk regex setungan bulan 1-12
@jufianto
jufianto / main.go
Created September 27, 2020 15:53
Golag Example Test Cide
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"testgolang/model"
)
@jufianto
jufianto / gist:5caf3f1fa8a75786cc2ac6d52cf7c49e
Created September 14, 2020 07:37
Setup CRSF Token in JS Process
## Set to app.blade.php
```html
<script>
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
</script>
@jufianto
jufianto / hello.go
Created February 23, 2020 13:32
golang learn medium [1]
// you have package main, after compiling go compiler will find your package main with func main
package main
// import some package in go,
import (
"fmt"
)
// main is the main package in go, you have create this function if you want your program runs well
func main() {
{
"openapi": "3.0.1",
"info": {
"title": "Senang SIMRS App API Docs",
"description": "Dokumentasi SIM RS Rumah Sakit Zainab",
"version": "1.0.0"
},
"servers": [
{
"url": "http://localhost:8989/v1"
{
"swagger": "2.0",
"info": {
"description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
"version": "1.0.0",
"title": "Swagger Petstore",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"email": "apiteam@swagger.io"
},
openapi: 3.0.1
info:
title: Senang SIMRS App API Docs
description: Dokumentasi SIM RS Rumah Sakit Zainab
version: 1.0.0
servers:
- url: http://localhost:8989/v1
tags:
- name: akunuser
description: Manajemen Akun User
@jufianto
jufianto / fix_python_mysql
Created October 1, 2019 14:38
error saat install mysqlclient pyhton
mysql dengan harus install paket
`pip install --user mysqlclient` kalau error install dulu paketnya di linux
`sudo apt-get install libmysqlclient-dev
`
# Code by Jufi
# Do Not Remove This
import os, time
from time import sleep
from flask import Flask, flash, redirect, render_template, url_for, request, json, make_response, jsonify, Response
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from config import app_config