Skip to content

Instantly share code, notes, and snippets.

View ahmadshobirin's full-sized avatar
😶‍🌫️

Ahmad Shobirin ahmadshobirin

😶‍🌫️
View GitHub Profile
#############blade
<!-- Modal edit-->
<div id="modal-edit" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
@ahmadshobirin
ahmadshobirin / template product
Last active January 10, 2019 04:33
template product
@extends('index')
@section('contentheader_title','Master Produk')
@section('customcss')
<link rel="stylesheet" href="{{ asset('/plugins/datatables/dataTables.bootstrap.css') }}">
<link rel="stylesheet" href="{{ asset('/plugins/datatables/jquery.dataTables.min.css') }}">
@endsection
@section('content')
@ahmadshobirin
ahmadshobirin / detail product
Last active January 10, 2019 04:34
detail product
@extends('index')
@section("contentheader_title")
Detail Produk {{ ucfirst($product->product) }}
@endsection
@section('customcss')
<link rel="stylesheet" href="{{ asset('/plugins/datatables/dataTables.bootstrap.css') }}">
<link rel="stylesheet" href="{{ asset('/plugins/datatables/jquery.dataTables.min.css') }}">
error: function (xhr) {
console.log(xhr);
if (xhr.readyState === 4) {
if (xhr.status === 404) {
swal({
type: 'error',
title: 'Oops...',
text: xhr.responseJSON.error,
});
} else {
@ahmadshobirin
ahmadshobirin / Parse Variabel Json to Jquery Laravel
Last active August 26, 2019 07:29
Parse Variabel Json to Jquery Laravel
//Controller
public function edit($id)
{
$data = User::where('id',$id)->first()->toJson(); //only model can use toJson()
return view('admin/pencatatan/form',[ 'data' => $data]);
}
//js-view
var data = {!! $data !!}
@ahmadshobirin
ahmadshobirin / form-register aslab
Created October 12, 2019 05:05
form-register aslab
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tugas Pertama HTML</title>
</head>
<style>
#register-form{
margin: 0 auto;
width: 350px;
@ahmadshobirin
ahmadshobirin / Upload All Files In Folder Local To VPN Server, UBUNTU
Last active May 29, 2020 04:05
Upload All Files In Folder Local To VPN Server, UBUNTU
#Use SCP, make sure you have installed it or installed it now
`sudo apt install openssh-client` or `sudo apt-get install openssh-client`
1. Open Terminal
2. command: `scp -r localpath/* user@ip:/path/to/upload`
Note:
`-r` meaning a recursive get all files and sub folder
`localpath` is a local folder on your computer, and user `/*` get only files, subfolders
@ahmadshobirin
ahmadshobirin / One Command LINE Git add, commit, push.md
Last active December 15, 2022 19:42
One Command LINE Git add, commit, push

TYPE IN TERMINAL


git config --global alias.lazy '!f() { git add -A && git commit -m "$@" && git push; }; f'

REFRESH U TERMINAL

and use this command for add, and commit

@ahmadshobirin
ahmadshobirin / GENERATE NO TRANSACTION INCREMENT OR SEQUENCE BY QUERY
Created July 24, 2020 07:16
GENERATE NO TRANSACTION INCREMENT OR SEQUENCE BY QUERY
--GENERATE PLAN LINK200600807 FOR COLUMN 'ordersn'
--USED MAX NOT COUNT
--TESTED IN POSTGRESQL
-- FUNCTION ONLY POSTGRES
-- 1. '||' FOR CONCAT
-- 2. 'TO_CHAR' FOR GENERATE DATE FORMAT
-- 3. '::TEXTT' FOR CASTING
SELECT 'LINK' || to_char(CURRENT_DATE, 'YYMMDD') ||
@ahmadshobirin
ahmadshobirin / readme.md
Created August 5, 2020 08:37 — forked from benstr/readme.md
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


Paragraph