Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Galih Pratama galpratama

🎯
Focusing
View GitHub Profile
@galpratama
galpratama / app.blade.php
Created Mar 17, 2021
Laravel Datatables Snippet
View app.blade.php
<!--- Tambahkan setelah app.css --->
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/responsive/2.2.3/css/responsive.dataTables.min.css" rel="stylesheet">
<style>
/*Form fields*/
.dataTables_wrapper select,
.dataTables_wrapper .dataTables_filter input {
color: #4a5568; /*text-gray-700*/
padding-left: 1rem; /*pl-4*/
padding-right: 1rem; /*pl-4*/
View ResponseFormatter.php
<?php
namespace App\Http\Controllers\API;
class ResponseFormatter
{
protected static $response = [
'meta' => [
'code' => 200,
'status' => 'success',
@galpratama
galpratama / laravel-tools.md
Created Sep 17, 2019
Aplikasi Yang Harus Dipasang
View laravel-tools.md

Windows

1. Laragon https://laragon.org/
	1. PHP
	2. MySQL
	3. Composer
	4. PHPMyAdmin
2. Cmder (opsional) https://cmder.net
3. NodeJS (opsional)  https://nodejs.org/en/

macOS

View 4chan
104.16.119.221 boards.4chan.org
104.16.59.249 i.4cdn.org
View hasil_jadi.css
nav ul {
margin: 0;
padding: 0;
list-style: none;
}
nav li {
display: inline-block;
}
View demo.sass
$font-stack: Helvetica, sans-serif
$primary-color: #333
body
font: 100% $font-stack
color: $primary-color
View variable.scss
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
color: $primary-color;
}
@galpratama
galpratama / sass-responsive-mixin.scss
Created Feb 25, 2016 — forked from peschee/sass-responsive-mixin.scss
SASS responsive mixin (bootstrap breakpoints)
View sass-responsive-mixin.scss
/**
* Responsive mixin. The media breakpoints are as defined
* in the twitter bootstrap framework:
*
* - phone
* - tablet-portrait
* - tablet-landscape-desktop
* - large-desktop
*
* Additional parameters for tagetting retina and non-retina
@galpratama
galpratama / pxtoem-function.scss
Created Nov 23, 2015 — forked from ariona/pxtoem-function.scss
Pixel to Em function for SASS
View pxtoem-function.scss
$browser-context: 16;
@function em($pixels, $context: $browser-context) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}
@if (unitless($context)) {
$context: $context * 1px;
}
View profile.js
// Rating Submit by User
$('#ratingForm input').on('change', function() {
var button = $(this).find(".rtg");
var data = new FormData();
data.append('id', $('input[name=shopID]', '#ratingForm').val());
data.append('rate', $('input[name=rating]:checked', '#ratingForm').val());